Solved

detect broken TCP socket conneciton

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now