Discuss this help topic in SecureBlackbox Forum

WebSocket: Accept client connection

First of all you should handle TElHTTPSServer.OnBeforeWebSocketServerUsed() event, which will be fired when a client initiates WebSockets connection. In the parameter of this event your code will receive an instance of TElWebSocketServer. This instance is used to work with this client via web-socket connection. The instance should be configured by your code before usage. In particular, it's necessary to assign event handlers to TElWebSocketServer.OnBinaryData and/or TElWebSocketServer.OnTextData events.

TElHTTPSServer.OnWebSocketConnectionEstablished event is fired when incoming WebSocket connection is already established. After that you can send and receive data via the newly established connection.

How To articles about WebSocket

Discuss this help topic in SecureBlackbox Forum