TsgcRTCPeerConnection › Events › OnRTCWebSocketDisconnect
Fired when the signalling WebSocket disconnects; the close code is provided.
property OnRTCWebSocketDisconnect: TsgcRTCWebSocketDisconnectEvent;
// TsgcRTCWebSocketDisconnectEvent = procedure(Sender: TObject; Connection: TsgcWSConnection; Code: Integer) of object
—
Raised when the internal signalling WebSocket connection is closed, either by the local side, by the signalling server, or because the network link was lost. Code is the WebSocket close code (1000 for normal closure, 1006 for an abnormal termination, etc.). After this event no more SDP or ICE exchanges can take place until GatherCandidates is called again.
procedure TForm1.oRTCWebSocketDisconnect(Sender: TObject;
Connection: TsgcWSConnection; Code: Integer);
begin
Log(Format('Signalling closed (code=%d)', [Code]));
end;