Looks like nothing is possible to do in the simple and basic ways with ICS??

Wrong impression.

All I need is,
A server who accepts the clients and tells me which clients are online, can send once a while a simple command such as: "reboot" or send a file such as: "setup.exe" A client who accepts the command: "reboot" from the server and does the asked, receives the file "setup.exe" and does the asked.
The server will have maximum of 200 clients nothing more.

Have a look at TnSrv sample. It open a new form for each client and you are trhen able to use that form to send text to the client. TnSrv is closer to what you want to do but IMO do not represent the best way to program with ICS.

Could you please answer,
can this be done with ICS or not?

Yes it can.

if yes,
can you help me with the following procedure?
{This procedure sends the command to the clients and it works very nicely.}
procedure TSimpleSslServerForm.SendCommand;
SslWSocketServer1.Client[0].SendStr(ledSendCommand.Text); /// The PROBLEM here is: How do I send the command to a specific client if I have more than one client?
 Display('Command sent: ' + ledSendCommand.Text);

You can iterate thru Client[] array to find a client with the properties you need. You have direct access to IP and Port (look properties with "peer" in their name). And you can add any properties you like by deriving a new class and assigning it to TWSocketServer.ClientClass.

The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)

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