Re: How to check is connection is OK real time after connection is setup



Arkady Frenkel wrote:
You need to do some op ( send/recv ) to receive the answer
Arkady

To expand on what Arkady said:

The only way you can know 'in real-time' if a TCP connection is OK is to continuously send and receive data. That is the only way the TCP/IP stack can detect the lost connection, and it will then tell you on your next send or receive call.

<wangk1983@xxxxxxxx> wrote in message news:1141379406.796669.183770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

How to check is connection is OK real time after connection is setup
?(In the block state)
The following solutions are what I have used:
1 select
2 getsockopt
but both do not work.
Does anybody have realize it?could you provide us the code here?
Thanks!


--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
.


Loading