Skip to content

add Socket.writeIncremental - #3776

Open
reardonj wants to merge 1 commit into
typelevel:mainfrom
reardonj:3773-write-progress
Open

reardonj wants to merge 1 commit into
typelevel:mainfrom
reardonj:3773-write-progress

Conversation

@reardonj

@reardonj reardonj commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Adds support to write to a socket while reporting incrementally how many bytes were written, so that writing a large buffer can be monitored as it progresses. For simpler implementations, I have just duplicated them and varied to support responding with a stream. For the more complicated ones, I have modified the main implementation to be writeIncremental so to avoid introducing duplicating the code.

Fixes #3773

case _ =>
handshakeMutex.lock
.surround(stepHandshake(result, true)) >> wrap
// TODO: is this the right way to use and close the resource?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure how resources are scoped in a Pull. Is this right?

Adds support to write to a socket while reporting incrementally how many bytes were written, so that writing a large buffer can be monitored as it progresses. For simpler implementations, I have just duplicated them and varied to support responding with a stream. For the more complicated ones, I have modified the main implementation to be writeIncremental so to avoid introducing duplicating the code.
@reardonj
reardonj force-pushed the 3773-write-progress branch from cf0fc87 to 39db941 Compare October 8, 2026 02:15

This branch has not been deployed

No deployments
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.

Feature Proposal: report progress writing to sockets

1 participant