Solved

detect broken TCP socket conneciton

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

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

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 96
maxBlock challenge 30 142
move a line in eclipse 3 107
fizzArray  challenge 1 96
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…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.

820 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