thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thrift thrift <thriftu...@gmail.com>
Subject How to get client port number
Date Fri, 07 May 2010 02:02:34 GMT
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)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message