• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Is there a way to test if client side socket of one java process is alive by another

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to test if a client side socket connection is still alive which may or may not be connected to another java application?

The scenario is I have an application written in Java which I don't have the source code for which accepts client connections. Occasionally, the client connections don't terminate cleanly - (like a disconnect). The server eventually generates a java.net.SocketTimeoutException: Read timed out. This never occurred with Windows 2003 but now generates errors on Windows 2016.  This is likely because of the not so clean close from the client.
So I was thinking on trying to see if I can test the viability of these client connections. If their gone, then I'd kill the connection.

Any such luck in doing this - testing the connection if it's alive or not?

Robert
 
Ranch Hand
Posts: 694
Mac OS X Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if Java has such a feature but your question reminds me of the Two Generals Problem in computer science.  Wikipedia article on the two general's problem

I have heard of a Professor Leemon Baird who says that he has proven that his software -- which is written in the Java language -- has solved the two generals problem using a data structure and related algorithms that he has recently discovered.  

Hashgraph (the technology)
Swirlds (the company)

code-coach.net (my site)
 
reply
    Bookmark Topic Watch Topic
  • New Topic