dev@grizzly.java.net

Re: how to implement closing socket object related to SocketChannel after a period of time is expired

From: charlie hunt <charlie.hunt_at_sun.com>
Date: Sat, 02 Jan 2010 19:16:41 -0600
IIRC, I think what you are looking for is:
com.sun.grizzly.nio.transport.TCPNIOConnectorHandler.setConnectionTimeout(int timeout)

charlie ...

ming qin wrote:
Hi:

For Grizzly 2.0, how to implement closing socket object related to SocketChannel after  a  period of time is expired , but one endpoint of socket doesn’t receive any data from the other endpoint of socket?

 

 

Here is a scenario:

 

Server:  service Ready

Client:   greeting service

Server:   confirming service back

Client: ( no  data being send over ……) waiting……

Server:  (After 5 seconds, server closes the socket, since waiting time period is expired) closing socket ……

 

 

Mina has this implementation on this scenario, I was wondering how to implement same feature on Grizzly 2.0.  It seems to me that Processor is the right place to start …….



Ming Qin
Cell Phone 858-353-2839