Microsoft DirectX 9.0 SDK Update (Summer 2003) |
DPN_SP_CAPS Structure
Used to set and retrieve parameters for service providers.
Syntax
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
- Value must be set to the size of the structure.
- dwFlags
- 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 Internet Protocol (IP) and Internetwork Packet Exchange (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.
- DPNSPCAPS_SUPPORTSTHREADPOOL
- The service provider will support the thread pool.
- DPNSPCAPS_NETWORKSIMULATOR
- Specifies the DP8Sim service provider.
- 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 can only increase this value. Decreasing the value will have no effect. The setting is process wide, which means it will affect your current Microsoft® DirectPlay® object and any other DirectPlay objects in your process.
You can 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_HOSTS_QUERY and DPN_MSGID_ENUM_HOSTS_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 can 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 can 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
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.
Structure Information
Header dplay8.h Minimum operating systems Windows 98, Pocket PC 2002