thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip B Oldham <phillip.old...@gmail.com>
Subject Re: How to discover the bound port for a TServerSocket?
Date Tue, 17 Aug 2010 13:04:14 GMT
I believe TServerSocket is a wrapper. Try something like
`sock.socket.getLocalPort()` (if it's public).

On Tue, Aug 17, 2010 at 1:54 PM, Roy Smith <roy@panix.com> wrote:
> I'm trying to use TServerSocket (in java) without specifying a port.  The classic pattern
is something like:
>
> ServerSocket sock();
> sock.bind(0);
> int myPort = sock.getLocalPort();
>
> but TServerSocket doesn't appear to have the getLocalPort() functionality.  Am I missing
something, or does this really not exist?
>
>



-- 
Phillip B Oldham
phillip.oldham@gmail.com
+44 (0) 7525 01 09 01

Mime
View raw message