Solved

How to retreive the client Ip addr

Posted on 1998-12-04
4
274 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 91
Correct Component for Shopping Cart. 2 120
Using MMsystem To change audio input 1 14
TlistView is Really heavy on Android 3 12
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 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