Hi Gianni,

getOrigin() could be what you are looking for:

https://github.com/apache/thrift/blob/042580f53441efe1bc5c80c89351fcb30740659e/lib/cpp/src/thrift/transport/TSocket.cpp#L952

Have fun,
JensG




-----Ursprüngliche Nachricht----- 
From: Gianni Ambrosio
Sent: Monday, April 1, 2019 3:24 PM
To: [email protected]
Subject: how to get IP and port from ServiceIf call?

Dear All,
I have a Thrift server implemented in C++. Many different clients can
connect to it and call let's say "setData" method of a ServiceIf
implementation. The server in that method must be able to associate the
sent data to the proper client. So, is it possible to retrieve the IP
address and port of the client or should I send them to the same
"setData" call as parameters?

Best regards,
Gianni 

Reply via email to