users@grizzly.java.net

Re: Handle to server when client connection is accepted

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 19 Jan 2009 13:09:36 -0500

Salut,

vijay phaneendra wrote:
> Hi
>
> I am able to get the client connection reference in the filter. The
> filter will be called after the message is formed by the protocol
> parser. I need to get a handle when the server does an ACCEPT from the
> client and before any bytes are read from the client.

Just do something like that:

TCPSelectorHandler sh = new TCPSelectorHandler(){

   @Override
   public boolean onAcceptInterest(SelectionKey key,
                     Context ctx) throws IOException {

           super.onAcceptInterest(key,ctx);

           // Add you code here :-)
}

Let us know.

-- Jeanfrancos


>
> Appreciate your help.
>
> Regards
> VP