NAME

catnet_getfd - get a socket descriptor from a file descriptor

SYNOPSIS

#include <cat/cat.h>

int catnet_getfd(cat_session *session, int fd_id, CATSOCK *sock);

DESCRIPTION

This function returns the value of a specified file descriptor of the I/O Handler.

fd_id is a single file descriptor and must not be a combination of several file descriptors.

*sock specifies where the socket descriptor will be stored. The socket is not affected by this operation. While the socket is in use by the session, it should not be used for any other purpose.

The function returns CAT_OK if successful, or a negative code on error.

SEE ALSO

cat, catnet, catnet_setfd