users@grizzly.java.net

Re: suitability for writing UDP servers

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Wed, 31 Oct 2007 12:25:18 +0100

>> Because datagramChannel.socket().getRemoteSocketAddress()
>> returns null for server side Datagram channel. And only
>> datagramChannel.receive(ByteBuffer) returns SocketAddress.
>> So in case, if UDP packet will come to both channels
>>
> in most cases it will not. I think Linux and BSD are right, not sure about
> windows, but it is unlikely that someone runs production server on windows
> and nobody cares about performance hit for development system (most ppl develop on Windows, deploy on unix).
>
I checked on Windows XP with JDK 1.5.0_11. Packet comes just on one of
the channels, but from run to run it chooses different channel:
sometimes new registered ("dedicated"), sometimes old "server" channel.
Looks like this trick could be unpredictable.

Thanks.

WBR,
Alexey.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>