Support reading from `ReadCursor` / writing to `WriteCursor` via `Socket`
Open
@rahulrangers is already working on this.
Since Mar 14, 2025.
feature
- Dominant language
- Scala
- Stars
- 2.5k
- Forks
- 636
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 7
Description
There are some really efficient APIs for this:
- https://man7.org/linux/man-pages/man2/sendfile.2.html
- https://docs.oracle.com/javase/8/docs/api/java/nio/channels/FileChannel.html#transferTo-long-long-java.nio.channels.WritableByteChannel-
- https://docs.oracle.com/javase/8/docs/api/java/nio/channels/FileChannel.html#transferFrom-java.nio.channels.ReadableByteChannel-long-long-
- https://std.in/using-sendfile-with-nodejs/
I'm fairly confident we can add a default implementation to Socket just using the Stream APIs. If so, then this opens the door for more specialized overrides on the actual implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.