programatik29 / axum-server

High level server designed to be used with axum framework.
MIT License
166 stars 54 forks source link

feat: restore ability to control HTTP config and set `TCP_NODELAY` #99

Closed neoeinstein closed 7 months ago

neoeinstein commented 7 months ago

Add a NoDelayAcceptor that can be used to set the TCP_NODELAY flag on accepted streams. Also exposes a Builder from hyper-util to allow for a user to configure the HTTP options they previously did.

Unfortunately, the hyper-util builder is not Clone or Debug, even though the field types are, so I needed to manually derive Debug for Server and used an Arc to reuse the Builder in the various accept tasks. Those workarounds can be removed if hyperium/hyper-util#72 is accepted.

abs0luty commented 7 months ago

Thanks ❤