Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

How to retreive the client Ip addr

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
mabell
Asked:
mabell
  • 2
1 Solution
 
BigRatCommented:
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
 
mabellAuthor Commented:
I think I need an exemple
0
 
TimYatesCommented:
Do you mean this?

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

Tim.
0
 
mabellAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now