feat: add impl for node sockets (wip)#214
Conversation
12ffdd8 to
8c40715
Compare
49c868b to
06f068e
Compare
|
@manekinekko I've updated #154 to reflect the latest WIT definitions. You may want to check your list against that. I believe this should result in slightly less work. The main difference is that the symbols are now namespaced. Plus the manual |
|
Thanks! |
|
The wasi-socket WITs have just been updated. Hopefully for the last time before Preview2 |
|
Thank you @badeend for the heads up :) |
1e9d88e to
bde9d63
Compare
44426cf to
429d033
Compare
20ac85e to
b9e43d7
Compare
|
This PR adds ~80% of the wasi-socket implementation for node.js. As suggested, we can merge this PR as-is and work on the remaining impl + tests (most of then are tcp/udp stream-related). |
guybedford
left a comment
There was a problem hiding this comment.
Per discussion today I'm happy to merge this as soon as the tests are passing and work through follow-up PRs from there.
| serializeIpAddress, | ||
| } from "./socket-common.js"; | ||
|
|
||
| // TODO: move to a common |
There was a problem hiding this comment.
Are you referring to moving these to the sockets-common.js file here?
|
|
||
| this[symbolSocketState].lastErrorState = null; | ||
|
|
||
| const err = this.#socket.listen(this[symbolSocketState].backlogSize); |
There was a problem hiding this comment.
It would be good to move to a model where we have the completion callback here.
There was a problem hiding this comment.
Will investigate
|
@guybedford unit tests are passing. PR should be ready for merge. Will send other PR to migrate to node:net and node:dgram. |
A work in progress PR that adds support for node sockets.
Closes #154 (check issue for progress)