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: getting endpoint address within the processor
Date Sat, 20 Jun 2009 12:09:48 GMT
Hi,

I have asked this in May and got a very helpful answer.
Have a look at the thread, especially at http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200905.mbox/%3CBD8AA0F1-7820-45E4-BFF5-942F1513A205@dajerade.pl%3E

Patrick

 
Am Samstag 20 Juni 2009 um 12:47PM schrieb "Mateusz Berezecki" <mateuszb@gmail.com>:
>Hi,
>
>I'm in a desperate need to know from what IP address is the call to my
>thrift server coming from and it seems to me that that's not possible
>in Thrift at all !! The level of isolation is so high that I'd have to
>hack simply too much stuff. Makes me wonder what use is getHost()
>function then ? Apparently it's either a bloat or someone did not
>finish something ?
>
>m:thrift m$ grep -r "getHost" *
>lib/cpp/src/transport/TSocket.cpp:std::string TSocket::getHost() {
>lib/cpp/src/transport/TSocket.h:  std::string getHost();
>lib/php/src/transport/TSocket.php:  public function getHost() {
>m:thrift m$
>
>Is there _any_ way for me to get the IP from which the request is
>coming from or do I really need to hack through tons of code?
>
>I can easily get access to protocol objects by overriding
>TProcessor::process(...) method in my custom processor and then just
>fall through to real processor to do the processing, but there's
>simply no way to get anything useful from the protocol object. I'm
>just kind of amazed because of this design that there's no way to do
>such a fundamental way of knowing what IP is trying access what. Uh
>oh?
>
>I do really hope that I am wrong. Can someone please be so kind and
>enlighten me ? I'm really short on time on this one.
>
>best,
>Mateusz
>
>

Mime
View raw message