When listening on a socket, I would ideally like to limit the backlog to zero, i.e.
listen( socket, 0 );
However, based on the following post, listen() ignores the backlog argument?, this wouldn't work. Is there any way I can reliably achieve a backlog of 0?
The closest you can get is to
listen()
,accept()
andclose()
in one step. This should provide the same overall effect as a backlog of zero, except that you must re-create and bind the socket each time.I am not sure why you would want this, though.