Grab Client Information when OnConnect occurs (TServerSocket)
Posted on 2001-08-01
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
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.
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.
TObject; Socket: TCustomWinSocket);
aClient.sIP := TClientSocket(Sender).Address;
aClient.sName := TClientSocket(Sender).Host;
Help me please....