Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

detect broken TCP socket conneciton

Posted on 1997-12-22
1
Medium Priority
?
558 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
1 Comment
 
LVL 3

Accepted Solution

by:
altena earned 400 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

916 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