Said in other word: How do I find the index to use with Client[] property
?
We cannot answer that question for you because we don't know the criteria
!
You can create a form to ask the user which IP the client has and then
iterate thru Client[] array and look for the correct IP.
Yes,
This is what I need and Iam trying to send command to the client by using
it's IP
As I can see here (OnProcessData) that I am getting the IP -->
Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' +
but,
I don't know how to do this, and that is what I have been looking in the
demos to find today.
Something like this ? (Out of my head, not tested)
for ClientNo := 0 to WSocketServer1.ClientCount - 1 do begin
if Client[ClientNo].PeerAddr = '192.168.1.123' then begin
Client[ClientNo].SendStr('HelloWorld'#13#10);
break;
end;
end;
--
[email protected]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
--
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