c - What is SOCKET accept() error errno 316? -
on osx keep getting socket error of 316 after calling accept() on bound & listening socket. valid socket returned, , believe use fine, (though may not be, need double check this, accepting hundreds of connections @ moment) errno has been set.
i'm trying understand the documentation on unix accept(2) man pages notes (which, incidentally, missing apple's accept() documentation)
linux accept() (and accept4()) passes already-pending network errors on new socket error code accept(). behavior differs other bsd socket implementations. reliable operation application should detect network errors defined protocol after accept() , treat them eagain retrying.
now, 316 works out 256 or'd etimedout(60). so, i'm curious how should handling this;
- if error set after accept(), should accept() again?
- should close() socket accept did return?
- are unix errno code's 8 bit? (all codes see <128) , erroneous bit set in memory, or special flag, warning (i cannot find documentation on errno format's)
- does error mean connection popped stack timed out... , os disconnected them, or wasn't accept()'d me fast enough?
do not examine errno
unless accept()
has returned -1. if accept()
returns valid file descriptor value of errno
undefined.
Comments
Post a Comment