Skip to content

WebSocket WebAPI#2063

Merged
karlseguin merged 6 commits intomainfrom
websocket
Apr 7, 2026
Merged

WebSocket WebAPI#2063
karlseguin merged 6 commits intomainfrom
websocket

Conversation

@karlseguin
Copy link
Copy Markdown
Collaborator

Uses libcurl's websocket capabilities to add support for WebSocket.

Depends on lightpanda-io/zig-v8-fork#167 Issue: #1952

This is a WIP because it currently uses the same connection pool used for all HTTP requests. It would be pretty easy for a page to starve the pool and block any progress.

We previously stored the *Transfer inside of the easy's private data. We now store the *Connection, and a Connection now has a transport field which is a union for http: *Transfer or websocket: *Websocket.

@karlseguin karlseguin marked this pull request as ready for review April 2, 2026 02:45
@karlseguin karlseguin requested a review from krichprollsch April 2, 2026 10:14
Comment thread src/browser/webapi/net/WebSocket.zig Outdated
Comment thread src/browser/HttpClient.zig Outdated
Comment thread src/network/http.zig
Comment thread src/browser/tests/net/websocket.html Outdated
Comment thread src/browser/webapi/net/WebSocket.zig Outdated
Comment thread src/browser/webapi/net/WebSocket.zig
Comment thread src/browser/webapi/net/WebSocket.zig Outdated
Comment thread src/browser/webapi/net/WebSocket.zig
Comment thread src/browser/webapi/net/WebSocket.zig
Comment thread src/browser/webapi/net/WebSocket.zig
Uses libcurl's websocket capabilities to add support for WebSocket.

Depends on lightpanda-io/zig-v8-fork#167
Issue: #1952

This is a WIP because it currently uses the same connection pool used for all
HTTP requests. It would be pretty easy for a page to starve the pool and block
any progress.

We previously stored the *Transfer inside of the easy's private data. We now
store the *Connection, and a Connection now has a `transport` field which is
a union for `http: *Transfer` or `websocket: *Websocket`.
-dispatch error on abnormal close
-reciprocal close message
-more url validation
-cleanup dead code
@karlseguin karlseguin merged commit 8f1e394 into main Apr 7, 2026
12 checks passed
@karlseguin karlseguin deleted the websocket branch April 7, 2026 00:55
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants