Solved

detect broken TCP socket conneciton

Posted on 1997-12-22
1
542 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 123
has22 challenge 11 111
canBalance challenge 34 111
Not needed 13 134
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 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