Share via


ServerMessageWebSocket.Closed Event

Definition

Occurs when a close frame is received on the ServerMessageWebSocket object as part of the close handshake.

// Register
event_token Closed(TypedEventHandler<ServerMessageWebSocket, WebSocketClosedEventArgs const&> const& handler) const;

// Revoke with event_token
void Closed(event_token const* cookie) const;

// Revoke with event_revoker
ServerMessageWebSocket::Closed_revoker Closed(auto_revoke_t, TypedEventHandler<ServerMessageWebSocket, WebSocketClosedEventArgs const&> const& handler) const;
public event TypedEventHandler<ServerMessageWebSocket,WebSocketClosedEventArgs> Closed;
function onClosed(eventArgs) { /* Your code */ }
serverMessageWebSocket.addEventListener("closed", onClosed);
serverMessageWebSocket.removeEventListener("closed", onClosed);
- or -
serverMessageWebSocket.onclosed = onClosed;
Public Custom Event Closed As TypedEventHandler(Of ServerMessageWebSocket, WebSocketClosedEventArgs) 

Event Type

Windows requirements

App capabilities
internetClientServer privateNetworkClientServer

Applies to