Socket commuication questions

Discussion in 'Java' started by James Willans, Dec 17, 2004.

  1. 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
    James Willans, Dec 17, 2004
    #1
    1. Advertising

  2. 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
    Steve Horsley, Dec 17, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy
    Replies:
    1
    Views:
    4,761
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    944
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    526
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    644
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    698
Loading...

Share This Page