an_close(3) - Linux man page

Name

an_close - close an open socket

Synopsis

#include <antinat.h>

int an_close(ANCONN s);

Description

The an_close(3) function is used close a connection that had previously been created with an_accept(3), an_connect_tohostname(3) or an_connect_tosockaddr(3). Closing the socket does not destroy the handle; it terminates the network connection but the handle remains open to make other connections with. To destroy the handle, use an_destroy(3).

s is a socket previously created with an_new_connection(3), and connected using an_accept(3), an_connect_tohostname(3) or an_connect_tosockaddr(3).

Return Value

This call returns AN_ERROR_SUCCESS to indicate successful completion.

Errors

AN_ERROR_INVALIDARG
The connection supplied is not a valid connection.
AN_ERROR_NOTSUPPORTED
The proxy type or address type is not supported.

See Also

an_accept(3), an_connect_tohostname(3), an_connect_tosockaddr(3), an_destroy(3), an_new_connection(3)

Author

Malcolm Smith <malxau@users.sourceforge.net>