cp_connection_descriptor(3) - Linux man page

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

cp_socket(3)