Hi,
in Grizzly 2.0 we still don't have UDP transport implemented (hope to
have that very soon),
as for Grizzly 1.x - the way how you can use UDP - is very similar to
TCP.
Like here:
final ProtocolFilter readFilter = new ReadFilter();
final ProtocolFilter echoFilter = new EchoFilter();
final Controller controller = new Controller();
UDPSelectorHandler selectorHandler = new UDPSelectorHandler();
selectorHandler.setPort(port);
controller.setSelectorHandler(selectorHandler);
controller.setProtocolChainInstanceHandler(
new DefaultProtocolChainInstanceHandler(){
@Override
public ProtocolChain poll() {
ProtocolChain protocolChain = protocolChains.poll();
if (protocolChain == null){
protocolChain = new DefaultProtocolChain();
protocolChain.addFilter(readFilter);
protocolChain.addFilter(echoFilter);
}
return protocolChain;
}
});
for sure you may meet certain UDP specifics during implementation, but
example above could be good starting point.
WBR,
Alexey.
On May 15, 2009, at 4:14 , Richard Corsale wrote:
> Ohh yeah I just scanned over it. I guess I'll look into getting a
> UDP layer integrated . Anyone have any pointers :) like where I
> should start :)
>
> Sent from my iPhone
>
> On May 14, 2009, at 4:13 PM, Survivant 00 <survivant00_at_gmail.com>
> wrote:
>
>> I didn't really told that. I was asking about multicast support in
>> grizzly (1 or 2) but not for GWS and I'm not sure if you have
>> other package that the main framework for Grizzly2.
>>
>>
>>
>> 2009/5/14 Richard Corsale <igf1_at_yahoo.com>
>>
>> Hi all,
>>
>> I remember reading Survivant 00's post about UDP on GWS 2.0 ... I
>> don't recall how it ended :) do we have a functioning NIO UDP
>> server in GWS 2?
>>
>> If so, where can I get at it :)
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>