WebSocket is a web technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket. The WebSocket API is being standardized by the W3C, and the WebSocket protocol has been standardized by the IETF as RFC 6455.
WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. The WebSocket protocol makes possible more interaction between a browser and a web site, facilitating live content and the creation of real-time games. This is made possible by providing a standardized way for the server to send content to the browser without being solicited by the client, and allowing for messages to be passed back and forth while keeping the connection open. In this way a two-way (bi-direction) ongoing conversation can take place between a browser and the server. A similar effect has been done in non-standardized ways using stop-gap technologies such as comet.
In addition, the communications are done over the regular TCP port number 80, which is of benefit for those environments which block non-standard Internet connections using a firewall. WebSocket protocol is currently supported in several browsers including Firefox and Google Chrome. WebSocket also requires web applications on the server to be able to support it.
sgcWebSockets is a complete package providing access to WebSockets protocol, allowing to create WebSockets Servers, Intraweb Clients or WebSocket Clients in VCL, Lazarus/FPC and Firemonkey applications.
- Fully functional multithreaded WebSocket server according to RFC 6455.
- Supports Firemonkey (Windows, MacOS, iOS and Android).
- Supports Lazarus / FreePascal.
- Supports CBuilder.
- Supports C# .NET through sgcWebSockets.dll
- Supports Chrome, Firefox, Safari, Opera and Internet Explorer (including iPhone, iPad and iPod)
- Binary and Full Unicode Messages Support
- Message compression using PerMessage_Deflate extension.
- Flash FallBack for Web Browsers without native WebSockets (like Internet Explorer 6-9).
- Multiple Threads Support
- Server component providing WebSocket and HTTP connections through the same port.
- Client WebSocket supports connections through Socket.IO Servers.
- Client WebSocket supports connections through HTTP Proxy Servers.
- WatchDog and HeartBeat built-in support.
- Events Available: OnConnect, OnDisconnect, OnMessage, OnError
- Built-in sub-protocols: JSON-RPC 2.0(Transactional Messages, PubSub, RPC, Queues, QoS and more), Datasets, Binary Files, WebRTC and WAMP.
- Easy to setup
- Async Events using Ajax
- SSL/TLS support on Server and Client components
3.2: 2014 September
[+] : Added support for Rad Studio XE7.
[+] : Added support for AppMethod.
[+] : Added support for Server-Sent Events API (SSE), push notifications from server to client using http connection.
[+] : New Component TsgcWebSocketProxyServer: server that translates WebSocket protocol to normal socket, allowing a browser to connect to any application/server.
[+] : New Property "WatchDog"
Server: keeps server active automatically (disabled by default).
Client: reconnects automatically after an unexpected disconnection (disabled by default).
[+] : New Property "LocalIP" on TsgcWSConnection, returns IP Address of Host.
[+] : New Property "LocalPort" on TsgcWSConnection, returns Port Address of Host.
[+] : New Property "HeartBeat" on Server Components: sends a ping every x seconds (disabled by default).
[+] : New Property "IO_API" on TsgcWebSocketClient_SocketIO:
ioAPI0: supports socket.io 0.* servers (selected by default)
ioAPI1: supports socket.io 1.* servers
- : Fixed Bug writing data on TsgcWebSocketClient_SocketIO if connection is not Active.
- : Fixed Bug on search paths runtime packages from Delphi XE3-XE6.
- : Fixed DeadLock writing data on Server and Client components.
- : Fixed Bug reading JSON objects passed as parameters in SGC and Dataset Protocols.
- : Fixed Memory Leak OnException Event.
- : Fixed Bug Broadcast method using Exclude parameter.
- : Fixed Bug sending double quoted string inside a JSON parameter.
- : Fixed DeadLock when Keep-Alive is active on TsgcWebSocketHTTPServer.
- : Fixed Bug retrieving MIME-Type from file, when TsgcWebSocketHTTPServer tries to serve a file from DocumentRoot.
- : Fixed DeadLock on TsgcTimer class when compiled as a library.
- : Fixed Warnings.
[/] : Deleted property TsgcWSConnectionServer.ServerHost
[/] : Deleted property TsgcWSConnectionServer.ServerPort