websocket-client

command
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package websocket-client demonstrates websocket Phase 2: a CLIENT-side DialDuplexAdapter connecting one go-codex process to another over a real WebSocket connection, plus AsyncAPI spec generation for the socket.

  • SERVER: DuplexPort + DuplexSocketAdapter (Phase 1) — echoes commands
  • CLIENT: a second DuplexPort (types mirrored: receives Update, sends Command) bound with DialDuplexAdapter — auto-reconnect with backoff, gap SocketErrors on the Errors channel, session generations c1,c2,…
  • SPEC: ports.RegisterSocket renders the socket as an AsyncAPI channel (Subscribe = inbound frames, Publish = outbound frames) — OpenAPI cannot express WebSocket, AsyncAPI can

Running

go run ./examples/websocket-client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL