Skip to content

websocket-client 0.1.0

Choose a tag to compare

@sonic182 sonic182 released this 12 Nov 11:11
· 103 commits to main since this release
24ff4b7
[dependencies]
websocket-client = { git = "https://github.com/agentica-lang/packages", tag = "websocket-client-0.1.0", subdir = "websocket-client" }

websocket-client is a WebSocket client (RFC 6455) for ws:// and wss:// over std TCP and TLS. Needs Agentica 0.30.0 or later.

  • WebSocket.connect does the upgrade handshake and the Sec-WebSocket-Accept check, with subprotocols and extra headers.
  • send_text, send_binary, send_ping, send_pong and close; every frame is masked.
  • receive gives whole text and binary messages, answers a ping with a pong, and answers a close frame.
  • A message size limit, a read timeout, and protocol errors as error results after the close frame.
  • Every timeout is from 1 ms to one day.

Full list: CHANGELOG.

Docs: https://agentica-lang.github.io/packages/websocket-client/