SGC 프로토콜

원격 프로시저 호출, 발행-구독 메시징, 트랜잭션 작업, QoS, 메시지 확인을 제공하는 JSON-RPC 2.0 기반 커스텀 프로토콜이에요.

TsgcWSPClient_sgc / TsgcWSPServer_sgc

eSeGeCe의 네이티브 Pub/Sub + RPC 서브프로토콜이에요 — 채널, 큐 레벨, 세션 재개, 트랜잭션을 지원해요. Delphi / C++ Builder / .NET 간 와이어 호환이에요.

컴포넌트 클래스

TsgcWSPClient_sgc

프로토콜

sgcWebSockets 네이티브 서브프로토콜 (WebSocket 위에서)

플랫폼

Windows, macOS, Linux, iOS, Android

에디션

Standard / Professional / Enterprise

컴포넌트를 놓고, 속성 몇 개만 설정하면 끝

TsgcWebSocketServer와 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 속성, 11개의 메서드, 15개의 이벤트 — 컴포넌트 레퍼런스에서 가져왔어요.

연결

Published 속성: Client, Broker, Guid.

메시징

Published 속성: QoS.

수명 주기

이벤트: OnConnect, OnDisconnect, OnError.

고급

메서드: WriteData.

진단

Published 속성: Version.

PubSub

메서드: Subscribe, UnSubscribe, UnSubscribeAll.

명세 및 참고 자료

이 컴포넌트가 구현하는 프로토콜의 공인 출처예요.

문서 및 데모

컴포넌트 레퍼런스로 바로 이동하고, 바로 실행할 수 있는 데모 프로젝트를 받아보고, 체험판을 다운로드하세요.

데모 프로젝트 — Demos\Protocols\sgc 바로 실행할 수 있는 예제 프로젝트예요. sgcWebSockets 패키지에 포함되어 있으니 아래에서 체험판을 다운로드해 보세요.
기술 문서 (PDF) 이 컴포넌트의 기능, 빠른 시작, Delphi 및 C++ Builder 코드 샘플, 출처 참고 자료예요.
사용자 설명서 (PDF) 라이브러리의 모든 컴포넌트를 다루는 종합 설명서예요.

SGC 프로토콜을 사용할 준비가 되셨나요?

무료 체험판을 다운로드하고 JSON-RPC 메시징으로 개발을 시작해 보세요.