thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Schlangen <p.schlan...@mac.com>
Subject AW: Re: Client IP address
Date Wed, 06 May 2009 19:01:09 GMT
 
Am Mittwoch 06 Mai 2009 um 08:14PM schrieb "Krzysztof Godlewski" <krzysiek@dajerade.pl>:
>I implemented this using TServerEventHandler:
>  * there's a static map that holds client addrs: map<unsigned long,  
>string>
>  * client addresses are added to a map in MyHandler::clientBegin(),  
>pthread_self() is the key in address map

That sounds like a great idea. But how do you get the client's IP in clientBegin()?
I tried to cast the input or output parameter to a TSocket and call getPeerAddress() but it
returns an empty string only.

Patrick

Mime
View raw message