Skip to content

Conversation

@Thalhammer
Copy link
Member

The regular send method can return early after sending part of the buffer (for example because the tcp window is full) and hence needs to be usually used in a loop until the whole buffer is sent or an error has occurred.

send_exact implements this loop, which is especially usefull when using the callback variant, because the callback wont get invoked until theres an error or all the data is sent, which drastically reduces the amount of boilerplate code.

@Thalhammer Thalhammer force-pushed the thalhammer/send_exact branch from b045e4a to 2b1597e Compare January 8, 2026 21:47
@Thalhammer Thalhammer merged commit 4c24440 into master Jan 8, 2026
19 checks passed
@Thalhammer Thalhammer deleted the thalhammer/send_exact branch January 8, 2026 21:58
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.

2 participants