Skip to content

wasm: add host-side vsock listeners - #42

Closed
tombl wants to merge 1 commit into
wasmfrom
vsock-host-listen
Closed

wasm: add host-side vsock listeners#42
tombl wants to merge 1 commit into
wasmfrom
vsock-host-listen

Conversation

@tombl

@tombl tombl commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Accept guest-initiated connections in the virtio-vsock device. listen(port, handler) binds a callback-scoped listener: the connection lives exactly as long as the handler, resolving into a graceful shutdown and rejecting into a reset. Track connections by local and peer port so several guest sockets can share one service port, allocate host ephemeral ports from [2^30, 2^31) like Firecracker's muxer so they can never collide with listeners, deliver end of stream when the guest shuts down its send side, and answer packets for unbound ports with RST as the kernel transport does.

Accept guest-initiated connections in the virtio-vsock device.
listen(port, handler) binds a callback-scoped listener: the connection
lives exactly as long as the handler, resolving into a graceful shutdown
and rejecting into a reset. Track connections by local and peer port so
several guest sockets can share one service port, allocate host
ephemeral ports from [2^30, 2^31) like Firecracker's muxer so they can
never collide with listeners, deliver end of stream when the guest
shuts down its send side, and answer packets for unbound ports with RST
as the kernel transport does.
@tombl

tombl commented Aug 13, 2026

Copy link
Copy Markdown
Owner Author

Superseded now that the host-side JavaScript lives in tombl/distro:

@tombl tombl closed this Aug 13, 2026
@tombl
tombl deleted the vsock-host-listen branch August 16, 2026 09:24
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