Skip to content

Conversation

bytenik
Copy link
Contributor

@bytenik bytenik commented Jun 17, 2025

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behavior

'drain' event occurs with no arguments

New behavior

'drain' event occurs with an argument containing the list of packets that were sent by the transport

Other information (e.g. related issues)

@darrachequesne
Copy link
Member

Hmm, shouldn't you go a bit deeper and catch the drain event emitted by the HTTP response? In order to be sure that the packet has been written to the kernel buffer and can safely be released.

References:

Related: #5353

@bytenik
Copy link
Contributor Author

bytenik commented Jun 17, 2025

Hmm, shouldn't you go a bit deeper and catch the drain event emitted by the HTTP response? In order to be sure that the packet has been written to the kernel buffer and can safely be released.

References:

Related: #5353

For Websockets, the ws library is handling that I think and it won't callback until its finished writing out. Do you see something different?

You are possibly right about long-polling though; I can defer our drain until the HTTP drain. I just pushed out that change. Though does long-polling even support buffers? I was under the impression it was base64-ing them.

I am not seeing a mechanism for uWebSockets to tell us when they have actually written out the buffer.

@bytenik bytenik marked this pull request as ready for review June 29, 2025 19:42
@bytenik
Copy link
Contributor Author

bytenik commented Aug 13, 2025

Hi, just wanted to check in on this PR @darrachequesne; I can update it to eliminate the conflicts but I don't want to keep doing it if it won't merge soon.

@bytenik
Copy link
Contributor Author

bytenik commented Aug 31, 2025

@darrachequesne Can I do anything to help get more engagement on this PR? Thanks!

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