Socket commuication questions

J

James Willans

If there is a more appropriate newsgroup to place this message then
please point me in the right direction.

We have an application that has a server and a number of clients
communicating using sockets. The java.nio libraries are used in the
server and java.io libraries are used in the clients (this may not be
relevant). We are currently testing our application on a windows
machine. All works fine until the status of the network changes, for
example if a wireless signal is momentarily lost the read and write
data methods begin throwing exceptions. I'm having trouble
determining whether or not the network disconnection is causing the
socket to be lost, or whether it is simple unavailable while the
network sorts itself out. In the case of the former, is the usual
strategy to simply handle the disconnection by recreating the socket?
In the case of the former, should I be performing checks prior to
check whether it is an unstable state? Any further information would
be much appreciated.

James
 
S

Steve Horsley

James said:
If there is a more appropriate newsgroup to place this message then
please point me in the right direction.

We have an application that has a server and a number of clients
communicating using sockets. The java.nio libraries are used in the
server and java.io libraries are used in the clients (this may not be
relevant). We are currently testing our application on a windows
machine. All works fine until the status of the network changes, for
example if a wireless signal is momentarily lost the read and write
data methods begin throwing exceptions. I'm having trouble
determining whether or not the network disconnection is causing the
socket to be lost, or whether it is simple unavailable while the
network sorts itself out. In the case of the former, is the usual
strategy to simply handle the disconnection by recreating the socket?
In the case of the former, should I be performing checks prior to
check whether it is an unstable state? Any further information would
be much appreciated.

James

A "momentary" interruption should not cause problems. Maybe it is
incovering bugs in your code.

What sort of exceptions?

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top