Solved

How to test if client is dropped (tcp/ip)

Posted on 2002-03-07
2
159 Views
Last Modified: 2010-04-05
Should tcp/ip connection notice automaticly if client drops out when the computers network cable got detached or dialup-internet connection was lost.
  My server should be able to test these hanging dead connections, because when the user reconnects it's username is already used in a hanging dead connection.
  Is there a call in tcp/ip routines that could verify working connection without changing client or server by adding a ping routine.
  I'm using Francois Piette's tcp/ip component (http://overbyte.alexid.fr/frame_index.html) in delphi 1.2

Regards
  Olmy
0
Comment
Question by:olmy
[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
  • 2
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 6849481
hi
as far as im aware you will have to ping to check
as tcp/ip is only a protocol i dont see how its going to know when connection is dropped.pinging is always the safest way to check.
same as for testing if internet connection exists.
if you can use wininet in d1 then something like this could help:

procedure TForm1.Button1Click(Sender: TObject);
var
   dwConnectionTypes: dWord;
begin
dwConnectionTypes := 0;
if InternetGetConnectedState(@dwConnectionTypes, 0) then
  showmessage('connected')
 else
  showmessage('not connected');
end;

check teh sources of some of he online components,maybe one of them works in d1 or you can use sources ofit.
www.torry.net may have something useful.
Regards Barry
0
 
LVL 17

Expert Comment

by:inthe
ID: 6849486
when i say online componenst ,i mean caus ei got a componet called tonline thtas can tell if im onine or not by using ras api,it checks if a dialup connection has been made or not but it says for d2 and up so doubt it works on d1
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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

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