// Create websocket server
oServer := TsgcWebSocketServer.Create(nil);
oServer.Port := 80;
// Create WebRTC protocol and assign to websocket server
oWebRTC := TsgcWSPServer_WebRTC.Create(nil);
oWebRTC.Server := oServer;
// Handle Server methods
oWebRTC.OnConnect := OnWebRTCConnectHandler;
oWebRTC.OnMessage := OnWebRTCDisconnectHandler;
// start server
oServer.Active := True;