DPN_SP_CAPS
Used to set and retrieve parameters for service providers.
typedef struct _DPN_SP_CAPS{
DWORD dwSize;
DWORD dwFlags;
DWORD dwNumThreads;
DWORD dwDefaultEnumCount;
DWORD dwDefaultEnumRetryInterval;
DWORD dwDefaultEnumTimeout;
DWORD dwMaxEnumPayloadSize;
DWORD dwBuffersPerThread;
DWORD dwSystemBufferSize;
} DPN_SP_CAPS, *PDPN_SP_CAPS;
Members
- dwSize
- This value must be set to the size of the structure.
- dwFlags
- This can be a combination of the following flags.
- DPNSPCAPS_SUPPORTSDPNSRV
- DPNSVR.EXE will provide port sharing for the given SP. Currently this flag is available on IP and IPX only. See Using the DirectPlay DPNSVR Application for a further discussion of DPNSVR.
- DPNSPCAPS_SUPPORTSBROADCAST
- On IP and IPX applications, the service provider has the ability to broadcast to find games if not enough addressing information is passed.
- DPNSPCAPS_SUPPORTSALLADAPTERS
- The service provider will use all devices on the system. There is no need to specify a device element.
- dwNumThreads
- Number of threads the service provider will use for servicing network requests. The default value for this is based on an algorithm that takes into account the number of processors on the system. Most applications will not need to modify this value.
After a service provider is active in your process, you may only increase this value. Decreasing the value will have no effect. The setting is process wide, which means it will affect your current DirectPlay object and any other DirectPlay objects in your process.
You may specify a lower value than the default if you call the SetSPCaps method before you call an EnumHosts, Connect, or Host method.
- dwDefaultEnumCount
- Default enumeration count.
- dwDefaultEnumRetryInterval
- Default retry interval, in milliseconds.
- dwDefaultEnumTimeout
- Default enumeration timeout value, in milliseconds.
- dwMaxEnumPayloadSize
- Maximum size of the payload information that can be sent in the pvResponseData member of the structures that accompany the DPN_MSGID_ENUM_HOST_QUERY and DPN_MSGID_ENUM_HOST_RESPONSE messages..
- dwBuffersPerThread
- The number of outstanding receive buffers allocated for each DirectPlay thread. If you increase the number of receive buffers, DirectPlay can pull more data out of the operating system buffers. However, you may also increase latency if data is arriving faster than your application can process it.
- dwSystemBufferSize
- The size of the operating system buffer. This buffer holds data from the communications device when your application cannot process data as fast as it arrives. The purpose of this buffer is to prevent data loss if you receive a sudden burst of data, or if the receive threads are momentarily stalled. Increasing dwSystemBufferSize may increase latency if your application cannot process the received data fast enough. You can eliminate the operating system buffer by setting dwSystemBufferSize to 0. However, if you do so, you run the risk of losing data if you cannot process the received data as fast as it arrives.
Remarks
For DirectX 8.1, the dwBuffersPerThread and dwSystemBufferSize members are used only by IP and IPX service providers. The default values for these members are set by the service provider. To determine the default value, call the appropriate GetSPCaps method. Most applications should use the default values for these two members. They are intended primarily for use by developers writing server applications for massively-multiplayer games.
Requirements
Windows NT/2000/XP: Available as a redistributable for Windows 2000 and later.
Windows 98/Me: Available as a redistributable for Windows 98 and later.
Header: Declared in Dplay8.h.