Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow setting buffer sizes on server_socket #2458

Closed

Commits on Oct 11, 2024

  1. allow setting buffer sizes on server_socket

    We add two options to set the recv and send (SO_RCVBUF, ...) buffer
    sizes on a listening socket (server_socket). This is mostly useful to
    propagate said sizes to all sockets returned by accept().
    
    It is already possible to set the socket option directly on the
    connected socket after it returned by accept() but experimentally this
    results in a socket with the specified buffer size but whose
    receive window will not be advertised to the client beyond the default
    (64K for current typical kernel defaults). So you get only some of the
    benefit of the larger buffer.
    
    Setting the buffer size on the listening socket, however, is mentioned
    as the correct approach in tcp(7) and does not suffer from the same
    limitation.
    
    A test is included which checks that the mechanism, including the
    inheritance, works.
    travisdowns committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    5b33a11 View commit details
    Browse the repository at this point in the history