This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Client / Server
 
It's not a secret anymore!