Skip to content

Code Examples

Production-grade code recipes showing how to construct real-time systems, dashboard metrics, RPC workflows, and robust clients.

1. Multi-Client Chat App

Demonstrates client subscription to a shared chat channel, broadcasting user frames, and handling messages:

2. Live Metrics Dashboard Stream

A lightweight telemetry script broadcasting performance metrics from server memory counters to all subscriber dashboards every second:

3. Request/Response (RPC) over Sockets

How to build a stateless Promise-based RPC request/response architecture on top of AfterLink's raw sequence numbers and ACK codes:

4. Automatic Client Reconnection

How to handle internet dropouts and socket pipe failures gracefully with AfterLink's native backoff reconnect parameters: