| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

socket_error

#include "sflsock.h"
int
socket_error (
    sock_t handle)

Synopsis

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.

Source Code - (sflsock.c)

{
#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
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation