sgcWebSockets is a web technology that provides more than one TCP for two-way communication channels. The WebSocket Component API is standardized by the W3C, and the WebSocket protocol is standardized by the IETF as RFC 6455. WebSockets is designed to run on web and server browsers, but can be used by any server or server program. The WebSocket protocol allows for more interaction between the browser and the website, facilitating live content and creating real-time games. This is possible by providing a standard way for the server to send the content to the browser without being requested by the client, and while the connection is open, it allows messages to be forwarded back and forth. In this way, the current two-way call can be established between a browser and a server.
Features sgcWebSockets:
A fully functional WebSocket server according to RFC 6455 Firemonkey support (Windows, MacOS, iOS and Android) Support for Lazarus / FreePascal, CBuilder, C # .NET via sgcWebSockets.dll Supports Chrome, Firefox, Safari, Opera and Internet Explorer (including iPhone, iPad and iPod). Support for binary and unicode messages Compress messages using PerMessage_Deflate Flash FallBack for Web browsers without native WebSockets (like Internet Explorer 6-9) The server component provides WebSocket and HTTP connectivity through the same port. Built under the protocol: JSON-RPC 2.0 (Operational Messages, PubSub, RPC, Attributes, QoS and more), Dataset, Binary Files, WebRTC and WAMP. Supports SSL / TLS on server and client components Javascript events for complete control Required system
Delphi 7 - Delphi 102 Tokyo
PDF sgcWebSockets 4.1.10 - 208 pages: http://www.esegece.com/manual/sgcWebSockets.pdf
Simple example of use.
How Create VCL WebSocket Client Example: open a websocket connection to echo.websocket.org
1. Create a new VCL Forms Application 2. Drop a TsgcWebSocketClient in a Form and configure Host and Port Properties to connect to Server. sgcWebSocketClient1.Host := 'echo.websocket.org'; sgcWebSocketClient1.Port := 80; 3. Drop a TButton in a Form, Double Click and type this code: sgcWebSocketClient1.Active := True; 4. Drop a TButton in a Form, Double Click and type this code: sgcWebSocketClient1.WriteData('Hello Server From VCL Client'); 5. Build Project and that's all, you have configured a basic WebSocket Client.
How Create VCL WebSocket Server Example: create a server which listen on port 80
1. Create a new VCL Forms Application 2. Drop a TsgcWebSocketServer in a Form and set listening port sgcWebsocketServer1.Port := 80; 3. On Events Tab, Double click OnMessage Event, and type following code: ShowMessage('Message Received From Client: ' + Text); 4. Drop a TButton in a Form, Double Click and type this code: sgcWebSocketServer1.Active := True; 5. Build Project and that's all, you have configured a basic WebSocket Server.
How Create Linux WebSocket Server Example: Simple Server listening on port 5000.
program sgcWebSockets_linux; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, sgcWebSocket; var oServer: TsgcWebSocketServer; begin try oServer := TsgcWebSocketServer.Create(nil); oServer.Port := 5000; oServer.Active := True;
while oServer.Active do Sleep(10); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end;
sgcWebSockets v4.4.4 for D7-D10.4 Sydney Full Source.7z https://download.csdn.net/download/weixin_41863029/19549195 任何人都可以下載和發布嗎?
----------------------------------------------
-