Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TCP cable disconnect detection  RSS feed

 
Sajid Insaf
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written some JNDI code to connect to an LDAP directory server and am performing tests on its behaviour when a query is made to the directory server after the network cable has been pulled out from the server.
There seems to be an issue whereby this cable disconnection cannot be detected until the protocol itself timesout the request.
Does anyone know of a method by which this can be detected?
 
le taylom
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you do some sort of 'ping' to the server to see if it is still 'up'?
i.e. use an snmp api and do an snmp post on the server. a reply means ok, no reply means down?
 
Sajid Insaf
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
le,
Thanks for the reply. I have a ping style timeout mechanism in place, however would still like to know if there is some way it can be detected without having to time it out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!