aspose file tools*
The moose likes Java in General and the fly likes Client / Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Client / Server" Watch "Client / Server" New topic
Author

Client / Server

Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

Hi
I have a client/server application. The server serves to several clients at the same time. A client can close the connection with a special command. But i want that the connection is closed automatically by server when a client is not active for 10 second is.
How can i implement this?
Any help would be appreciated.
Cheers
Wagner Danda Da Silva Filho
Ranch Hand

Joined: Mar 21, 2003
Posts: 80
What are you using as protocol? Sockets, RMI?

If sockets, you can set a timeout and force your client to disconect. See this article: http://www.javacoffeebreak.com/articles/network_timeouts/
[ October 25, 2005: Message edited by: Wagner Danda ]

SCJP, SCWCD
Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

That is it! Thanks a lot Wagner.
Cheers
 
Don't get me started about those stupid light bulbs.
 
subject: Client / Server