Solved

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

Posted on 2002-03-07
2
157 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

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…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 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