-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
In #6366 we added support for the TCP_CORK flag on Linux. This flag is used by Puma to "cork" packets and work around the "delayed ack" problem.
However the logic in Puma also depends on TCP_INFO, which we still do not support. In puma/puma#2349, @ahorek modified Puma to only use the TCP_CORK logic when TCP_CORK is present, but it also checks for the presence of TCP_INFO. This means it will still not be used on JRuby.
Unfortunately the logic for TCP_INFO is much more than just defining the constant. See the related code from CRuby 2.6.5:
I believe we would need to do at least the following:
- Add constants for "TCPI".
- Duplicate the struct layout using JNR. This may be a good time for us to consider something like a jnr-socket that would supersede jnr-unixsocket but also handle socket options and other socket types. This would be a bridge to supporting FFI-based sockets as in Support the FFI-based rubysl-socket implementation #6334.
- Duplicate the destructuring macros from CRuby.
- Add appropriate constants and logic to JRuby.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels