Print

Print


I think SocketgetLocalAddress() would give you the wrong value (it gives 
YOUR value) -- the one for the server to use is Socket.getInetAddress().

One gotcha with either of these options: the address the island uses to 
connect to the server may NOT be the same address with which it wishes 
to connect to specific other islands; perhaps the island machines have 
multiple network interfaces.  But that'd require some hacking.

At any rate, I try to avoid bumping ECJ's minimum requirements when 
possible, though moving to 1.4 is hardly unreasonable at this time.

Sean

Tomasz Nowak wrote:
> Dnia 2008-09-13, sob o godzinie 22:47 -0400, Sean Luke pisze:
>> I am doing a CVS update with appropriate changes but it would require 
>> ECJ to bump to Java 1.4 minimum.  I'd prefer to avoid that if
>> possible, 
>> but ultimately it may be necessary.
>>
>> There is an alternative option.  The only place where we use this 
>> address is for the islands to tell the server what their address is. 
>> But it be sufficient to simply use the remote address of their
>> incoming 
>> socket connections to the server.  I'd need some debugging for that 
>> approach though.
> 
> Wow, that's a great idea. I guess you'd like to use
> serverSocket.getLocalAddress(), implemented since 1.1?
> TN