Skip to content

WebSocket Client - #53

Open
dkoontz wants to merge 1 commit into
gren-lang:mainfrom
dkoontz:websocket-client
Open

WebSocket Client#53
dkoontz wants to merge 1 commit into
gren-lang:mainfrom
dkoontz:websocket-client

Conversation

@dkoontz

@dkoontz dkoontz commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Introduces a new WebSocketClient module for connecting to WebSocket servers, and adds configurable backpressure to both the client and server sides of the WebSocket API.

Backpressure (client + server)

  • Both WebSocketClient.connect and WebSocketServer.createServer now take an options : Array Option field, currently supporting ReadBufferCapacity Int (default 16).
  • src/Gren/Kernel/WebSocketServer.js — the per-connection ReadableStream now uses a CountQueuingStrategy with the configured highWaterMark; when the buffer fills, the underlying socket is pause()d, and the stream's pull callback resume()s it once the consumer drains. Note: this is a breaking API change to createServer (added required options field).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant