cp_connection_descriptor(3)
| cp_socket(3) | cp_socket | cp_socket(3) |
NAME
cp_connection_descriptor - connection descriptor for cp_socket connections
SYNOPSIS
#include <cprops/socket.h>
cp_socket *cp_connection_descriptor_get_socket( cp_connection_descriptor descriptor);
struct sockaddr_in *cp_connection_descriptor_get_addr( cp_connection_descriptor descriptor);
int cp_connection_descriptor_get_fd( cp_connection_descriptor descriptor);
DESCRIPTION
Connections made by a cp_socket created with CPSOCKET_STRATEGY_THREADPOOL call a user defined thread function with the connection information wrapped in a cp_connection_descriptor struct.
cp_connection_descriptor_get_socket returns a pointer to the originating cp_socket;
cp_connection_descriptor_get_addr returns a pointer to a struct sockaddr_in describing the address the connection was made from; and
cp_connection_descriptor_get_fd returns to file descriptor number for this connection.
SEE ALSO
| OCTOBER 2005 | libcprops |
