Skip to content

Latest commit

 

History

History
63 lines (45 loc) · 2.82 KB

File metadata and controls

63 lines (45 loc) · 2.82 KB

WSC — Implementations

An implementation is a higher-level package that uses a language binding to provide a complete, runnable client or gateway. It adds I/O, connection lifecycle management, session handling, and — in the case of a gateway — downstream protocol translation.


Structure

Implementations are organized by language, then by role:

implementations/
└── <language>/
    ├── README.md     ← getting-started guide for this language
    ├── client/       ← client implementation
    └── server/       ← gateway implementation

Client vs. Gateway

Role Responsibility
Client Initiates the connection; constructs and sends WSC packets; receives and dispatches incoming packets to application code
Gateway Accepts client connections; deserializes incoming packets; reads Transport Descriptors; routes to protocol-specific forwarding modules; translates and forwards to downstream systems

Available Implementations

Language Path Binding Protocol version Status
JavaScript js/ bindings/js/ 1.1.0 Stable

Adding a New Implementation

  1. Create a directory implementations/<language>/.
  2. Add a README.md covering installation, quick-start for both client and gateway roles, and configuration reference.
  3. Reference the binding it depends on under bindings/<language>/.
  4. Follow the session model defined in core/spec/06-session.md.

What a client implementation must provide

Feature Spec reference
Connection initiation and lifecycle (IDLE → CONNECTING → CONNECTED) §06
Packet ID sequencing §06 — Packet ID Sequencing
Session keepalive §06 — Session Keepalive
Send-path buffering behaviour §06 — Send-Path Behaviour
Graceful disconnection §06 — Graceful Disconnection

What a gateway implementation must provide

Feature Spec reference
All of the above (gateway is also a peer) §06
Transport Descriptor routing §05
Protocol–interface compatibility enforcement §05 — Compat Matrix
Message-type–protocol compatibility enforcement §05 — Compat Matrix
STATE_ERROR emission on invalid packets §07