thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <br...@rapleaf.com>
Subject Re: How to discover the bound port for a TServerSocket?
Date Tue, 17 Aug 2010 14:47:26 GMT
If this doesn't work, open a ticket.

On Aug 17, 2010 6:06 AM, "Phillip B Oldham" <phillip.oldham@gmail.com>
wrote:
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message