Partage via


XGameStreamingUnregisterConnectionStateChanged

Unregisters a previously registered XGameStreamingConnectionStateChangedCallback.

Syntax

bool XGameStreamingUnregisterConnectionStateChanged(
         XTaskQueueRegistrationToken token,
         bool wait
)

Parameters

token   _In_ Type: XTaskQueueRegistrationToken

Token that corresponded to the callback registration done via XGameStreamingRegisterConnectionStateChanged.

wait   
Type: bool

If wait is set to true, XGameStreamingUnregisterConnectionStateChanged will not return until both the registration has been revoked and any outstanding callbacks have completed.

If wait is set to false, XGameStreamingUnregisterConnectionStateChanged will return as soon as the registration has been revoked. Although no new callbacks will be delivered, an in progress callback may still be executing when the function returns.

Return value

Type: bool

Returns true if the unregistration was successful, false if it did not succeed.

Remarks

Note

This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.

This API can be used to stop listening to streaming client device's connection changes.

This should be done when the game is either going to only do a broad check of whether any clients are streaming by utilizing XGameStreamingIsStreaming, or is no longer going to do any optimizing of the experience due to streaming clients.

Requirements

Header: xgamestreaming.h

Library: xgameruntime.lib

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

See also

XGameStreamingConnectionStateChangedCallback
XGameStreamingRegisterConnectionStateChanged
XGameStreaming