axl_bool vortex_connection_set_socket ( VortexConnection conn,
const char *  real_host,
const char *  real_port 

Allows to configure the socket to be used by the provided connection.

This function is usually used in conjunction with vortex_connection_new_empty.

connThe connection to be configured with the socket provided.
_socketThe socket connection to configure.
real_hostOptional reference that can configure the host value associated to the socket provided. This is useful on environments were a proxy or TUNNEL is used. In such environments the host and port value get from system calls return the middle hop but not the destination host. You can safely pass NULL, causing the function to figure out which is the right value using the socket provided.
real_portOptional reference that can configure the port value associated to the socket provided. See real_host param for more information. In real_host is defined, it is required to define this parameter.
axl_true in the case the function has configured the provided socket, otherwise axl_false is returned.

References CONN_CTX, vortex_connection_set_sock_tcp_nodelay(), and VortexRoleMasterListener.