Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Socket commuication questions

Reply
Thread Tools

Socket commuication questions

 
 
James Willans
Guest
Posts: n/a
 
      12-17-2004
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
 
Reply With Quote
 
 
 
 
Steve Horsley
Guest
Posts: n/a
 
      12-17-2004
James Willans wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Steve Holden Python 1 02-03-2009 06:20 AM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Steve Holden Python 0 02-01-2009 12:45 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 0 02-01-2009 07:37 AM
socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 1 01-27-2009 05:05 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48,'Address already in use') Jean-Paul Calderone Python 0 01-27-2009 01:41 PM



Advertisments