IDirectPlay8Server Interface

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

IDirectPlay8Server Interface


Applications use the methods of the IDirectPlay8Server interface to create and manage the server for a Microsoft® DirectPlay® client/server transport session.

IDirectPlay8Server Members

AddPlayerToGroup Adds a client to a group. After the client is successfully added to the group, all messages sent to the group are sent to the client.
CancelAsyncOperation

Cancels asynchronous requests. Many methods of the IDirectPlay8Server interface run asynchronously by default. Depending on the situation, you might want to cancel requests before they are processed. All the methods of this interface that can be run asynchronously return an hAsyncHandle parameter.

Specific requests are canceled by passing the hAsyncHandle of the request in this method's hAsyncHandle parameter. You can cancel all pending asynchronous operations by calling this method, specifying NULL in the hAsyncHandle parameter, and specifying DPNCANCEL_ALL_OPERATIONS in the dwFlags parameter. If a specific handle is provided to this method, no flags should be set.

Close

Closes the open connection to a session and uninitializes the IDirectPlay8Server object.

CreateGroup

Creates a group in the current session. When this method is called, the server's message handler receives a DPN_MSGID_CREATE_GROUP message.

DestroyClient

Deletes a client from the session.

DestroyGroup

Deletes a group created by the IDirectPlay8Server::CreateGroup method.

EnumGroupMembers

Retrieves a list of all players in a group.

EnumPlayersAndGroups

Retrieves a list of all the player and/or group identifiers for the application.

EnumServiceProviders

Enumerates the registered service providers available to the application.

GetApplicationDesc

Retrieves the full application description for the connected application.

GetCaps

Retrieves the DPN_CAPS or DPN_CAPS_EX structure for the current interface.

GetClientAddress

Retrieves the address for the specified player in the session.

GetClientInfo

Retrieves the client information set for the specified client.

GetConnectionInfo

Retrieves statistical information about the connection between the local server and the specified remote client.

GetGroupContext

Retrieves the group context value for a group.

GetGroupInfo

Retrieves a block of data associated with a group, including the group name.

This method is typically called after a DPN_MSGID_GROUP_INFO system message is received, indicating that the group data has been modified.

GetLocalHostAddresses

Retrieves the local addresses being used to host the session.

GetPlayerContext

Retrieves the player context value for a client.

GetSendQueueInfo

Used by the application to monitor the size of the send queue. DirectPlay does not send messages faster than the receiving computer can process them. As a result, if the sending computer is sending faster than the receiver can receive, messages accumulate in the sender's queue. If the application registers that the send queue is growing too large, it should slow the rate that messages are sent.

GetSPCaps

Retrieves the DPN_SP_CAPS structure for the specified service provider.

Host

Creates a new client/server session, hosted by the local computer.

Initialize

Registers an entry point in the server's code that receives the messages from the IDirectPlay8Server interface and from remote clients. This method must be called before calling any other methods of this interface.

RegisterLobby

Allows launched applications to automatically propagate game status to the lobby.

RemovePlayerFromGroup

Removes a client from a group.

ReturnBuffer

Retrieves message buffers provided to the application through the pReceiveData member of the DPN_MSGID_RECEIVE system message. If the user's message handler returns DPNSUCCESS_PENDING to the RECEIVE callback, DirectPlay assumes ownership of the buffer has been transferred to the application, and neither frees nor modifies it until ownership is returned to DirectPlay through this call.

SendTo

Transmits data to a client or group within the session. The message can be sent synchronously or asynchronously.

SetApplicationDesc

Changes the settings for the application that is being hosted. Only some settings can be changed.

SetCaps

Sets the DPN_CAPS or DPN_CAPS_EX structure for the current interface.

SetGroupInfo

Sets a block of data associated with a group, including the name of the group.

SetServerInfo

Sets the static settings of a server with an application. After clients successfully connect to the server, they can retrieve the information set by this method by calling theIDirectPlay8Client::GetServerInfo method.

SetSPCaps

Sets the DPN_SP_CAPS structure for the specified service provider.

Interface Information

Inherits fromIUnknown
Headerdplay8.h
Minimum operating systems Windows 98, Pocket PC 2002

© 2003 Microsoft Corporation. All rights reserved.