SliTaz Man Pages

Community Doc Forum Pro Shop Bugs Hg Cook

AN_SET_BLOCKING

Provided by antinat package
Section: Antinat Programmer's Manual (3)
Updated: 2005-02-25
Index Return to Main Contents

NAME

an_set_blocking - set whether sockets should wait for IO

SYNOPSIS

#include <antinat.h>

int an_set_blocking(ANCONN s, unsigned short blockingstatus);

DESCRIPTION

The an_set_blocking(3) function is used to switch sockets between blocking and non-blocking mode. In blocking mode, calls to read data from a socket will wait until some data is available to be read; in nonblocking mode, these calls will return immediately with an error condition. The only parts of the library which currently support non-blocking operation are in an_recv(3) and an_send(3). Currently, all other calls will silently switch to blocking mode, perform the operation, then switch back to the original blocking status. In order to switch to blocking mode, specify a zero parameter for blockingstatus. Use a non-zero parameter for non-blocking mode. Blocking mode is the default for all sockets.

s is a socket previously created with an_new_connection(3).

blockingstatus is set to zero to switch the socket into blocking mode, or non-zero to set into non-blocking mode.

RETURN VALUE

This call returns AN_ERROR_SUCCESS to indicate successful completion.

ERRORS

There is no error return.

CONFORMING TO

This function appeared in Antinat 0.70.

SEE ALSO

an_new_connection(3)

AUTHOR

Malcolm Smith <malxau@users.sourceforge.net>

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO
AUTHOR