Is my socket open?

Discussion in 'Java' started by Chase Preuninger, Apr 18, 2008.

  1. What is the most reliable way to tell if a socket is sill connected?
    Chase Preuninger, Apr 18, 2008
    #1
    1. Advertising

  2. Chase Preuninger

    Daniel Pitts Guest

    Eric Sosman wrote:
    > Chase Preuninger wrote:
    >> What is the most reliable way to tell if a socket is sill connected?

    >
    > Move some data through it.
    >

    Specifically, if your application-level protocol supports some sort of
    ping/pong handshake, use it as appropriate. You can also have some sort
    of time-out, where if you haven't had any activity in /n/ minutes,
    assume the connection is dead.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Apr 20, 2008
    #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,816
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    965
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    545
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    661
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    715
Loading...

Share This Page