PFLobbyServerLeaveAsServer

Requests that the server leave the client-owned lobby it's currently in.

Syntax

HRESULT PFLobbyServerLeaveAsServer(  
    PFLobbyHandle lobby,  
    void* asyncContext  
)  

Parameters

lobby   PFLobbyHandle

The handle of the lobby.

asyncContext   void*
optional

An optional, app-defined, pointer-sized context value that can be used to associate the completion state change with this call.

Return value

Type: HRESULT

S_OK if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via PFMultiplayerGetErrorMessage().

Remarks

To use this feature, you must define PFMULTIPLAYER_INCLUDE_SERVER_APIS before including PFLobby.h.

This method queues an asynchronous operation to exit the client-owned lobby. On completion, a PFLobbyServerLeaveLobbyAsServerCompletedStateChange is provided indicating that the operation completed.

This operation is restricted to client-owned lobbies that are using connections.

Any server-owned data previously added to the lobby is NOT automatically deleted when the server leaves the lobby. If there's a desire to also delete the serverData, it should be explicitly done by calling PFLobbyServerPostUpdateAsServer() before leaving the lobby.

Requirements

Header: PFLobby.h

See also

PFLobby members