wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Client / Server" Watch "Client / Server" New topic

Client / Server

Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

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.
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 ]

Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

That is it! Thanks a lot Wagner.
I agree. Here's the link: http://aspose.com/file-tools
subject: Client / Server
Similar Threads
Transfer file from a client to server
Server/Client simple doubt
need help in handling HttpServletRequest
Communication between different protocols