SGC Protocol
A JSON-RPC 2.0 based custom protocol providing remote procedure calls, publish-subscribe messaging, transactional operations, QoS, and message acknowledgment.
A JSON-RPC 2.0 based custom protocol providing remote procedure calls, publish-subscribe messaging, transactional operations, QoS, and message acknowledgment.
The native eSeGeCe Pub/Sub + RPC subprotocol — channels, queue levels, session resumption, transactions. Wire-compatible Delphi / C++ Builder / .NET.
TsgcWSPClient_sgc
sgcWebSockets native subprotocol (over WebSocket)
Windows, macOS, Linux, iOS, Android
Standard / Professional / Enterprise
Drop a server + client subprotocol pair on top of a TsgcWebSocketServer and TsgcWebSocketClient.
uses
sgcWebSocket, sgcWebSocket_Server, sgcWebSocket_Protocol_sgc_Server,
sgcWebSocket_Protocol_sgc_Client, sgcWebSocket_Types;
var
WSServer: TsgcWebSocketServer;
ServerProto: TsgcWSPServer_sgc;
WSClient: TsgcWebSocketClient;
ClientProto: TsgcWSPClient_sgc;
begin
// --- server side -----
WSServer := TsgcWebSocketServer.Create(nil);
WSServer.Port := 80;
ServerProto := TsgcWSPServer_sgc.Create(nil);
ServerProto.Server := WSServer;
WSServer.Active := True;
// --- client side -----
WSClient := TsgcWebSocketClient.Create(nil);
WSClient.Host := '127.0.0.1';
WSClient.Port := 80;
ClientProto := TsgcWSPClient_sgc.Create(nil);
ClientProto.Client := WSClient;
WSClient.Active := True;
// publish / subscribe through a named channel
ClientProto.Subscribe('orders');
ClientProto.Publish('{"id":42}', 'orders', '', queueLevel0);
ClientProto.RPC('call-1', 'getQuote', 'AAPL');
end;
5 published properties, 11 methods, 15 events — pulled from the component reference.
Published properties: Client, Broker, Guid.
Published properties: QoS.
Events: OnConnect, OnDisconnect, OnError.
Methods: WriteData.
Published properties: Version.
Methods: Subscribe, UnSubscribe, UnSubscribeAll.
Authoritative sources for the protocols this component implements.
Przejdź bezpośrednio do dokumentacji komponentu, pobierz gotowy do uruchomienia projekt demonstracyjny i pobierz wersję próbną.
| Projekt demonstracyjny — Demos\Protocols\sgc Gotowy do uruchomienia projekt przykładowy. Dostarczany w pakiecie sgcWebSockets — pobierz wersję próbną poniżej. | Otwórz | |
| Dokument techniczny (PDF) Funkcje, szybki start, przykłady kodu dla Delphi i C++ Builder oraz odniesienia do źródeł — tylko ten komponent. | Otwórz | |
| Podręcznik użytkownika (PDF) Kompleksowy podręcznik obejmujący każdy komponent biblioteki. | Otwórz |