TsgcWebSocketClient | WebSocket HandShake

WebSocket protocol uses an HTTP HandShake to upgrade from HTTP Protocol to WebSocket protocol. This handshake is handled internally by TsgcWebSocket Client component, but you can add your custom HTTP headers if server requires some custom HTTP Headers info.

Example: if you need to add this HTTP Header "Client: sgcWebSockets"


void OnHandshake(TsgcWSConnection *Connection, ref TStringList *Headers)
{
  Headers->Add("Client: sgcWebSockets");
}

You can check HandShake string before is sent to server using OnHandShake event too.