Function simultaneousAccepts


#include <src/uvw/tcp.h>

bool simultaneousAccepts(bool enable=true)


Enables/Disables simultaneous asynchronous accept requests.

Enables/Disables simultaneous asynchronous accept requests that are queued by the operating system when listening for new TCP connections.
This setting is used to tune a TCP server for the desired performance. Having simultaneous accepts can significantly improve the rate of accepting connections (which is why it is enabled by default) but may lead to uneven load distribution in multi-process setups.


enable - True to enable it, false otherwise.

True in case of success, false otherwise.


Lines 36-38 in src/uvw/tcp.cpp. Line 101 in src/uvw/tcp.h.

UVW_INLINE bool TCPHandle::simultaneousAccepts(bool enable) {
    return (0 == uv_tcp_simultaneous_accepts(get(), enable));

Add Discussion as Guest

Log in