Download sgcWebSockets 3.4
Transcript
sgcWebSockets 3.4 TsgcWebSocketHTTPServer TsgcWebSocketHTTPServer implements Server WebSocket Component and can handle multiple threaded client connections as TsgcWebSocketServer, and allows to server HTML pages using a built-in HTTP Server, sharing the same port for websocket connections and HTTP requests. Follow next steps to configure this component: 1. Drop a TsgcWebSocketHTTPServer component in 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 4. If you want, you can handle events: OnConnect: every time a WebSocket connection is established, this event is fired. OnDisconnect: every time a WebSocket connection is dropped, this event is fired. OnError: every time there is a WebSocket error (like mal-formed handkshake), this event is fired. OnMessage: every time a client sends a text message and it's received by server, this event is fired. 78