PFLobbyGetServerConnectionStatus
Retrieves the lobby server's connection status to the notification service.
Syntax
HRESULT PFLobbyGetServerConnectionStatus(
PFLobbyHandle lobby,
PFLobbyServerConnectionStatus* connectionStatus
)
Parameters
lobby
PFLobbyHandle
The handle of the lobby.
connectionStatus
PFLobbyServerConnectionStatus*
output
The output connection status of the server.
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
When joining a lobby, the library establishes a WebSocket connection to the PlayFab PubSub notification service. This connection is used to provide real-time updates to the library about the lobby. This method can be used to determine the lobby server's connection status, which is useful for diagnosing the lobby server's ability to receive updates about the lobby.
Non-owning Lobby servers can only join client-owned lobbies. If no server is joined to the client-owned lobby, this method returns an appropriate error code.
A lobby server, which is still in the process of asynchronously joining the lobby, via a call to PFMultiplayerJoinLobbyAsServer() sees its connection status as PFLobbyServerConnectionStatus::NotConnected until the connection is established.
A change to a lobby server's connection status is indicated to the title via a PFLobbyUpdatedStateChange with the PFLobbyUpdatedStateChange::serverConnectionStatusUpdated
field set to true.
Requirements
Header: PFLobby.h