[gnet] how to get *server* ip address?



Hi all, 

i'm having a little problem: I'm writing a client-server p2p app, and I
need to get the IP address the clients connect to my server.

I do this to get it: 

	 addr2 = gnet_tcp_socket_get_inetaddr(server);
	 name2 = gnet_inetaddr_get_canonical_name(addr2);
	 port2 = gnet_inetaddr_get_port(addr2);


but this doesnt work. the port comes out right, but the name2 is always
0.0.0.0. but the client HAS to connect to a *certain* ip, and this ip I
want to have! (for example: intranet-ip is 10.0.0.1 and external IP is
something completely different).

any ideas please? this is quite important for me cause i'm in deep time
trouble ... :-)



thanks, greetings and bye, 

		axel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]