Solved

How to retreive the client Ip addr

Posted on 1998-12-04
4
289 Views
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.
Thanks.
0
Comment
Question by:mabell
[X]
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
4 Comments
 
LVL 27

Expert Comment

by:BigRat
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?
0
 

Author Comment

by:mabell
ID: 1349320
I think I need an exemple
0
 
LVL 35

Accepted Solution

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

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

Tim.
0
 

Author Comment

by:mabell
ID: 1349322
Thanks.
0

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month6 days, 3 hours left to enroll

626 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