Hi John,
Yes, that is exactly what I want. Many thanks!
Regards,
-Yi Bing
2008/6/15 John ROM <snake-john_at_gmx.de>:
> Hi Yi Bing,
> you could override TCPSelectorHandler :
>
> TCPSelectorHandler sh = new TCPSelectorHandler() {
> public boolean onAcceptInterest(SelectionKey key, Context ctx)
> throws IOException {
> SelectableChannel channel = acceptWithoutRegistration(key);
>
> if (channel != null) {
> configureChannel(channel);
> SelectionKey readKey =
> channel.register(selector,
> SelectionKey.OP_WRITE);
> readKey.attach(System.currentTimeMillis());
> }
> return false;
> }
> };
>
>
> sh.setPort(serverPort);
> controller.setSelectorHandler(sh);
>
> Is that what you wanted?
>
> many greetings
>
> John
>
> --
> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>