You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by thrift thrift <th...@gmail.com> on 2010/05/07 04:02:34 UTC
How to get client port number
Hi,
I used
TSocket* tsocket = new TSocket("localhost", 9090);
int port1 = tsocket->getPeerPort();
printf("port1=%d\n", port1);
int port2 = tsocket->getPort();
printf("port2=%d\n", port2);
but both port1 and port2 showed server port number. Is there anyone know how
to get client port number? (either in client or in server side)