Le 4/6/13 11:04 AM, sridhar patra a écrit :
> Hi,
>
> I would be really thankful to you if i can get any help from the team
> regarding the following question.
>
> I am trying to create a mina  Tcp server .
>
> I have created a class by extending IoHandlerAdapter and also overide the
> methods like messageReceived, sessionOpened, sessionClosed etc.
>
> I have the requirement like
>       After the server has received 1,000 requests stop receiving the data.

That's easy : you can count the number of received messages, and when
you reach 1000, you either close the session, or you discard any
received message, and send back a warning.
>       After some time again start receiving the data.

If the session has been closed, you have a problem. If you are
discarding the received messages, then you can now accept them again.

Hop it helps.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to