TsgcWebSocketClient | Connect WebSocket Server

URL Property

The most easy way to connect to a WebSocket server is use URL property and call Active = true.

 

Example: connect to www.esegece.com using secure connection.


oClient := TsgcWebSocketClient.Create(nil);
oClient.URL := 'wss://www.esegece.com:2053';
oClient.Active := true;

Host, Port and Parameters

You can connect to a WebSocket server using Host and port properties.

 

Example: connect to www.esegece.com using secure connections


oClient := TsgcWebSocketClient.Create(nil);
oClient.Host := 'www.esegece.com';
oClient.Port := 2053;
oClient.TLS := true;
oClient.Active := true;