Solved

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

Posted on 2002-03-07
2
154 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
  • 2
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 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

12 Experts available now in Live!

Get 1:1 Help Now