Constants

sockets.inc

Socket connection type (TCP/UDP)

SOCKET_TCP
#define SOCKET_TCP 1
#define SOCKET_UDP 2

Socket flags

SOCK_NON_BLOCKING
#define SOCK_NON_BLOCKING (1 << 0)    /* Set the socket a nonblocking */
#define SOCK_LIBC_ERRORS  (1 << 1)    /* Enable libc error reporting */

Error reporting

SOCK_ERROR_OK
#define SOCK_ERROR_OK               0 /* No error */
#define SOCK_ERROR_CREATE_SOCKET    1 /* Couldn't create a socket */
#define SOCK_ERROR_SERVER_UNKNOWN   2 /* Server unknown */
#define SOCK_ERROR_WHILE_CONNECTING 3 /* Error while connecting */

Backwards compatible function.

Deprecated

Renamed to socket_is_readable()

#pragma deprecated Use socket_is_readable() instead