?
Solved

Grab Client Information when OnConnect occurs (TServerSocket)

Posted on 2001-08-01
6
Medium Priority
?
237 Views
Last Modified: 2010-04-06
OVERVIEW:
The application was designed in three moduls, they are:
1. Server (TServerSocket)
   Will receive any message from Controller, and send it
   to specified Terminal.
2. Client/Terminal (TClientSocket)
   Will only act as a message receiver.
3. Controller (TClientSocket)
   Specify the destination (Terminal) and send message to
   Server.

When the Controller connected to Server, it will receive
a LIST of active-connections (connected terminal) and
updated by Server everytime there were new connection or
disconnection. The Controller will using this LIST to
specify which Terminal will receive its message.

QUESTION:
The LIST will contain information of each active Terminal,
I want it contains the Terminal's IPAddress, HostName, ConnectionNumber, etc... I think Server would get this
info on the ClientConnect event, but how?

I have tried this, but it just contained null string.

procedure TfrmServer.sskServerClientConnect(Sender:
  TObject; Socket: TCustomWinSocket);
begin
   aClient.sIP := TClientSocket(Sender).Address;
   aClient.sName := TClientSocket(Sender).Host;
......
......

Help me please....
0
Comment
Question by:eddie_kho
[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
  • 3
  • 2
6 Comments
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 300 total points
ID: 6339810
Hi, try this instead

aClient.sIP := Socket.RemoteAddress;
aClient.sName := Socket.RemoteHost;
0
 

Author Comment

by:eddie_kho
ID: 6339842
i'll try it later...
thank u
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6341222
hi eddie_kho,

sorry for unrelated question!

are you a control ( Automation ) Eng. I am a senior Student of  Electrical Control Eng. and I do one cource project ( for Automation Cource ) a bit like your App that tiltle was : ' simulate DCS Automation System on Electrical Department LAN.

best regards
hamed
0
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!

 

Author Comment

by:eddie_kho
ID: 6343099
dragonslayer:
haaha...
i thought it won't be that ez...
but its really work, thank u dragonslayer

h_mohsenian:
i'm not a control eng as u thought, just a software eng (programmer analyst)... if u want to share info about your project, my addr: ad@binus.ac.id
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6343125
Eddie, if it works, and it works correctly, why a C grade? :(
0
 

Author Comment

by:eddie_kho
ID: 6344030
sorry... but i thought it was too easy... :p
sorry for disappointed you
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

777 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