Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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
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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

721 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