Complete moving all connection related data out of the hub_user object.
This commit is contained in:
@@ -104,6 +104,11 @@ static void net_con_event(int fd, short ev, void *arg)
|
||||
#endif
|
||||
}
|
||||
|
||||
const char* net_con_get_peer_address(struct net_connection* con)
|
||||
{
|
||||
return ip_convert_to_string(&con->ipaddr);
|
||||
}
|
||||
|
||||
void net_con_initialize(struct net_connection* con, int sd, struct ip_addr_encap* addr, net_connection_cb callback, const void* ptr, int ev)
|
||||
{
|
||||
int events = net_con_convert_to_libevent_mask(ev);
|
||||
|
||||
@@ -72,6 +72,12 @@ extern ssize_t net_con_recv(struct net_connection* con, void* buf, size_t len);
|
||||
extern void net_con_set_timeout(struct net_connection* con, int seconds);
|
||||
extern void net_con_clear_timeout(struct net_connection* con);
|
||||
|
||||
/**
|
||||
* Returns a string representation of the ipaddr member.
|
||||
* NOTE: Static buffer.
|
||||
*/
|
||||
extern const char* net_con_get_peer_address(struct net_connection* con);
|
||||
|
||||
#ifdef SSL_SUPPORT
|
||||
/**
|
||||
* Start SSL_accept()
|
||||
|
||||
Reference in New Issue
Block a user