Solved

detect broken TCP socket conneciton

Posted on 1997-12-22
1
549 Views
Last Modified: 2013-11-19
What is the simplest way to detect that the TCP connection is broken (ungracefully, e.g. network down) if using CAsynSocket?

If I unplug the network cable out from the computer,
the two connecting sockets do not know the connection is broken until one side try to send data to the other side. Is  there other way to detect such condition instead of implementing some kind of heart beat message?
0
Comment
Question by:alanyu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
altena earned 200 total points
ID: 1312880
I am pretty sure (sure enough to hit the answer button) that
you are right about the "heart beat message" or "pinging"

a Socket connection is nothing more than an illusion of a physical connection. So if there is no traffic, there is no way
to know if the connection is broken.

Even more assuring:
DCOM using a pinging scheme to determine if clients/servers are
still alive. (kind of a problem since all that pinging can easily
bring down a network)

  Happy Christmas.
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question