mirror of
https://github.com/libevent/libevent.git
synced 2025-01-20 05:02:55 +08:00
5880e4a1fc
A listening socket can be enabled with the sockopt TCP_DEFER_ACCEPT. This informs the kernel to not call the user-land accept() until real data has been written to the socket. A new flag LEV_OPT_DEFERRED_ACCEPT has been introduced to automatically set this option. Optionally evutil_make_tcp_listen_socket_deferred() can be called manually. (Tweaked slightly by nickm.)