Partager via


XGameStreamingConnectionStateChangedCallback

A callback function invoked whenever the state of a connected streaming client changes.

Syntax

void XGameStreamingConnectionStateChangedCallback(
         void* context,
         XGameStreamingClientId client,
         XGameStreamingConnectionState state
)

Parameters

context   _In_opt_
Type: void*

Context which was supplied when the event was subscribed to.

client   _In_
Type: XGameStreamingClientId

Client streaming device which the event references.

state   _In_
Type: XGameStreamingConnectionState

New connection state of the client.

Return value

Type: void

Remarks

The XGameStreamingClientChangedCallback is invoked whenever a streaming device connects or disconnects.

Upon registration, this callback is also invoked for each connected device.

Upon registering via XGameStreamingRegisterConnectionStateChanged, the callback is also invoked for devices that are already connected.

Requirements

Header: xgamestreaming.h

Library: xgameruntime.lib

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

See also

XGameStreamingConnectionState
XGameStreamingUnregisterConnectionStateChanged
XGameStreamingRegisterConnectionStateChanged
XGameStreaming