TsgcRTCPeerConnectionEvents › OnRTCWebSocketConnect

OnRTCWebSocketConnect Event

Fired when the signalling WebSocket has connected to the server.

Syntax

property OnRTCWebSocketConnect: TsgcRTCWebSocketConnectEvent;
// TsgcRTCWebSocketConnectEvent = procedure(Sender: TObject; Connection: TsgcWSConnection) of object

Default Value

Remarks

Raised once the internal signalling WebSocket client has completed the handshake with the TsgcWSPServer_RTCPeerConnection server. From this point the peer is registered on the signalling channel and ready to exchange SDP offers/answers and ICE candidates with the remote peer. The Connection parameter carries the underlying TsgcWSConnection and can be used for diagnostics or to send custom payloads over the signalling subprotocol.

Example

procedure TForm1.oRTCWebSocketConnect(Sender: TObject;
  Connection: TsgcWSConnection);
begin
  Log('Signalling connected: ' + Connection.Guid);
end;

Back to Events