TsgcWebSocketServer implements Server WebSocket Component and can handle multiple threaded client connections.
TsgcWebSocketServer implements Server WebSocket Component and can handle multiple threaded client connections. Follow the steps below to configure this component:
1. Drop a TsgcWebSocketServer component onto the form
2. Set Port (default is 80). If you are behind a firewall probably you will need to configure it.
3. Set Specifications allowed, by default, all specifications are allowed.
RFC6455: is standard and recommended WebSocket specification.
Hixie76: it's a draft and it's only recommended to establish Hixie76 connections if you want to provide support to old browsers like Safari 4.2
procedure OnTCPConnectEvent(aConnection: TsgcWSConnection; var Accept: Boolean);
begin
aConnection.Transport := trpTCP;
Accept := True;
end;
5. Create a procedure and set property Active = True.