Skip to content

wasip2: Deduplicate stream code in read/write/TCP#735

Open
alexcrichton wants to merge 2 commits intoWebAssembly:mainfrom
alexcrichton:refactor-read-and-write
Open

wasip2: Deduplicate stream code in read/write/TCP#735
alexcrichton wants to merge 2 commits intoWebAssembly:mainfrom
alexcrichton:refactor-read-and-write

Conversation

@alexcrichton
Copy link
Collaborator

This commit extends the support in #734 by deduplicating the separate paths for reading a stream shared between read and recvfrom, for example. The get_{read,write}_stream methods now return more metadata and the TCP recvfrom implementation delegates to an internal __wasilibc_read to perform the actual read. This opens up the door to supporting nonblocking reads/writes on other streams in the future, for example.

This commit extends the support in WebAssembly#734 by deduplicating the separate
paths for reading a stream shared between `read` and `recvfrom`, for
example. The `get_{read,write}_stream` methods now return more metadata
and the TCP `recvfrom` implementation delegates to an internal
`__wasilibc_read` to perform the actual read. This opens up the door to
supporting nonblocking reads/writes on other streams in the future, for
example.
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