TsgcWSPServer_WebRTC › Properties › Server
References the TsgcWebSocketServer that delivers the WebRTC signalling subprotocol over WebSocket connections.
property Server: TsgcWSComponent_Server read FServer write SetServer;
nil
Drop a TsgcWebSocketServer on the form and assign it here so every client that negotiates the WebRTC signalling subprotocol (the JavaScript shim served by the component, based on the sgc.webrtc message set) is routed to this handler. The WebSocket server owns the transport — ports, TLS, authentication, compression, HTTP responses — while this component implements the signalling relay that shuttles SDP offers/answers and ICE candidates between browser peers that share the same channel. Assigning Server registers the subprotocol automatically; setting it to nil unregisters. Use Broker when peers must connect over raw TCP instead.
WSServer := TsgcWebSocketServer.Create(nil);
WSServer.Port := 443;
WebRTCSrv := TsgcWSPServer_WebRTC.Create(nil);
WebRTCSrv.Server := WSServer;
WSServer.Active := True;