Skip to content

[FEATURE] Set SocketOpts #2965

@Bibo-Joshi

Description

@Bibo-Joshi

To improve the networking backend, we would like to set socketopts if possible. Before the asyncio switch, we did something like

# TODO p0: On Linux, use setsockopt to properly set socket level keepalive.
# (socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 120)
# (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 30)
# (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 8)
# TODO p4: Support setsockopt on lesser platforms than Linux.

It would be nice if we could do that for httpx as well at some point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions