TsgcRTCPeerConnectionEvents › OnRTCWebSocketDisconnect

OnRTCWebSocketDisconnect Event

Fired when the signalling WebSocket disconnects; the close code is provided.

Syntax

property OnRTCWebSocketDisconnect: TsgcRTCWebSocketDisconnectEvent;
// TsgcRTCWebSocketDisconnectEvent = procedure(Sender: TObject; Connection: TsgcWSConnection; Code: Integer) of object

Default Value

Remarks

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.

Example

procedure TForm1.oRTCWebSocketDisconnect(Sender: TObject;
  Connection: TsgcWSConnection; Code: Integer);
begin
  Log(Format('Signalling closed (code=%d)', [Code]));
end;

Back to Events