Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2002-03-07
2
Medium Priority
?
164 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 150 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Integration Management Part 2
Suggested Courses

885 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