Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
-Original Message- From: Francois PIETTE Sent: Monday, January 17, 2011 9:33 AM To: ICS support mailing Subject: Re: [twsocket] SslWSocketServer SslWSocket and it doesn't work Please be more specific. What error/exception do you have ? Hi Francois, Thanks for the response and

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Francois PIETTE
and it doesn't work Please be more specific. What error/exception do you have ? You have not answered this one. How can I selected a specific client, let's say client 1 and send a command to it? Speaking about code, you select it by its index in the Client[] property. How you find the

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
and it doesn't work Please be more specific. What error/exception do you have ? You have not answered this one. Most of the errors were -- Socket not connected. Speaking about code, you select it by its index in the Client[] property. How you find the right index is YOUR application

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Francois PIETTE
But, are you sure you don't want to revert the client/server roles ? It would be much simpler for you. I am sorry but I don't understand what you mean with this, Windows server/client rules or component? Do you think I need both in both sides? Here is how I see your problem solved: First

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Angus Robertson - Magenta Systems Ltd
Other solutions are obviously possible, including using server socket only at master side. My application only used a server at the master side, albeit three for redundnacy, so the clients only contacted the servers to report status and pick-up waiting commands. Actually, this was partially

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
Guys, Looks like nothing is possible to do in the simple and basic ways with ICS?? I was just thinking that I have understood a bit of the components today and now you guys are making it lot more complicated for me. All I need is, A server who accepts the clients and tells me which clients

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Angus Robertson - Magenta Systems Ltd
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.

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Francois PIETTE
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

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
Angus, Thanks for the response, I am very pleased with all the help I have got here and I do love ICS components. I wouldn't be trying do do anything with them would I? If I wouldn't be happy with the components and with the help. What I need here is some easy basic things not complecated

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Francois PIETTE
I have been checking all the demos and trying to understand about how to send a Command to a specific client and I simply can't find it! You found it because you told us: I have made this test procedure which works but only if there is just one client. {This procedure sends the command to

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Marc Charbonneau
I have made this test procedure which works but only if there is just one client. - {This procedure sends the command to the clients and it works very nicely.} procedure

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
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

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
- SslWSocketServer1.Client is an array of your clients. So if you have 2 clients, the first one is Client[0] and the second one is

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Arno Garrels
daniel cc wrote: - SslWSocketServer1.Client is an array of your clients. So if you have 2 clients, the first one is Client[0] and the

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Marc Charbonneau
so change your procedure to something like this : procedure TSimpleSslServerForm.SendCommand(ClientNo: integer); begin SslWSocketServer1.Client[ClientNo].SendStr(ledSendCommand.Text); Display('Command sent: ' + ledSendCommand.Text); end; How do you set this -- (ClientNo)? How do you get

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
What is so difficult? Property Client is an array of currently connected client objects, property ClientCount returns the number of objects in that array. You work with it like with a standard Delphi TList as well. For example, in order to iterate over all client objects: The difficulty is

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
Well, without knowing more on your setup, one way I can see to differentiate your clients is with their IP. The client IP is available in Client[x].PeerAddr. My setup? I am working on a demo, I have memo field where I need to see the number of the client. If I can get the number of the

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Marc Charbonneau
On Mon, Jan 17, 2011 at 2:26 PM, daniel cc dan...@signedsource.com wrote: Well, without knowing more on your setup, one way I can see to differentiate your clients is with their IP. The client IP is available in Client[x].PeerAddr. My setup? I am working on a demo, I have memo field where

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Francois PIETTE
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

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
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; Hi Francois, Could you please check the

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
Have a look at the event OnClientConnect, this is called whenever a client connect, just grab the client info there and you should be good to go. Thank you :) Now we are getting close. Here is what I have, and please see the line for the client number, Now I at least now where should I define

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Francois PIETTE
Could you please check the following code I normally don't review large chunk of code within free support. I usually do that when I have a consulting contract. Could you please check the following code of both server and client procedures and tell me what is missing in order to be able to

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Marc Charbonneau
Here is what I have, and please see the line for the client number, Now I at least now where should I define it, just need to find out how? --- procedure TSimpleSslServerForm.SslWSocketServer1ClientConnect(  

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
Marc, Why we are jumping to the another planet now? We are soo close!! Can you please see the code! This is just getting complicated all the time. Isn't this component having anything such as: CLIENTID?, CLIENTNO?, ID? which could be posted here in the same way as the IP address and the Port?

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Marc Charbonneau
Marc, Why we are jumping to the another planet now? We are soo close!! Can you please see the code! This is just getting complicated all the time. Isn't this component having anything such as: CLIENTID?, CLIENTNO?, ID? which could be posted here in the same way as the IP address and the

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc
If you REALLY can't figure it out, let me know and I'll play with it to try to find a solution for you. Thanks Marc, Have been playing 2 days with this and still can't find out the way how to do. -- To unsubscribe or change your settings for TWSocket mailing list please goto