How to retreive the client Ip addr

Posted on 1998-12-04
Medium Priority
Last Modified: 2012-05-04
Hi, I have build an little server prog with a ServerSocket
and I want to know how to retreive the client addr (IP) when it connect to my app (server). I don't want that the client send me its Ip by a SendText() procedure.
Question by:mabell
  • 2
LVL 27

Expert Comment

ID: 1349319
The IP address of the client comes with each TPC frame, so it you stick the hSocket into the procedure getsocketname it will return a TSockAddr structure containing the IP address. OK?

Author Comment

ID: 1349320
I think I need an exemple
LVL 35

Accepted Solution

TimYates earned 240 total points
ID: 1349321
Do you mean this?

procedure TForm1.ServerSocket1ClientConnect(Sender: TObject;
  Socket: TCustomWinSocket);
  ShowMessage( Socket.RemoteAddress ) ;


Author Comment

ID: 1349322

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

612 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