Hello,
I have now been thinking of this for a while and don’t know if I have already 
asked but here it comes,

We can get some remote info of the connected client from the following code but,
are there any possibilities of getting the computername as well?
if yes,
Please do help me out with it.

--------------[ C O D E 
]--------------------------------------------------------
{-|||||||||<<< - [ Socket Client connect ] - >>>|||||||||-}
procedure TfrmMain.SslWSocketServerClientConnect(Sender : TObject;
  Client : TWSocketClient;
  Error  : Word);
begin
    with Client as TTcpSrvClient do begin
        Inc(FClientNo); // Increment unique client no
        Tag := FClientNo; // tag connecting client with it's id
        Display('There is now ' +
        IntToStr(TWSocketServer(Sender).ClientCount) +
                ' clients connected.');
        Display('Client connected:|' +IntToStr(Tag)+ '|' +
                ' Remote:' +PeerAddr+ ':' +PeerPort+ '|' +
                ' Local:'  +GetXAddr+ ':' +GetXPort);

        LineMode            := True;
        LineEdit            := True;
        LineLimit           := 80; { Do not accept long lines }
        OnDataAvailable     := ClientDataAvailable;
        OnLineLimitExceeded := ClientLineLimitExceeded;
        OnBgException       := ClientBgException;
        ConnectTime         := Now;
        //You need to start inserting data into the xml here
    end;
end;
--------------[ C O D E 
]--------------------------------------------------------
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to