| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflsock.h" int socket_error ( sock_t handle)
Returns an errno value for the socket, or 0 if no error was outstanding on the socket. This function is useful if you are handling sockets using the select() function: this may return error indicators on sockets, without precision on the type of error. This function will return the precise error number. Errors like EINPROGRESS, EAGAIN, and EWOULDBLOCK can usually be ignored or handled by retrying.
{ #if (defined (DOES_SOCKETS)) # if (defined (__UTYPE_BEOS)) return (errno); # else return (getsockopt ((SOCKET) handle, SOL_SOCKET, SO_ERROR, 0, 0)); # endif #else return (0); #endif }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |