Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Is my socket open?

Reply
Thread Tools

Is my socket open?

 
 
Chase Preuninger
Guest
Posts: n/a
 
      04-18-2008
What is the most reliable way to tell if a socket is sill connected?
 
Reply With Quote
 
 
 
 
Daniel Pitts
Guest
Posts: n/a
 
      04-20-2008
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/>
 
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