Partager via


XGameStreamingGetConnectionState

Gets the current connection state for specified device.

Syntax

XGameStreamingConnectionState XGameStreamingGetConnectionState(  
         XGameStreamingClientId client  
)  

Parameters

client   _In_
Type: XGameStreamingClientId

The client to request the connection state of.

Return value

Type: XGameStreamingConnectionState

Remarks

This API returns the XGameStreamingConnectionState of the specified client. This allows for a check to see if the device has disconnected since the game last checked.

If the game is only trying to identify if ANY device is connected and streaming, consider using XGameStreamingIsStreaming.

If the game needs to get notification when a streaming client connects and/or disconnects, consider using XGameStreamingRegisterConnectionStateChanged

Requirements

Header: xgamestreaming.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XGameStreamingIsStreaming
XGameStreamingRegisterConnectionStateChanged
XGameStreamingGetClientCount
XGameStreamingGetClients
XGameStreaming