Re: [twsocket] SslWSocketServer SslWSocket

2011-01-18 Thread daniel cc
Message- From: Marc Charbonneau Sent: Tuesday, January 18, 2011 3:58 PM To: ICS support mailing Subject: Re: [twsocket] SslWSocketServer SslWSocket Thanks Marc, Have been playing 2 days with this and still can't find out the way how to do. Ok, here's a simple solution with TcpSrv demo

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

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread Francois PIETTE
The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be - Original Message - From: daniel cc dan...@signedsource.com To: ICS support mailing twsocket@elists.org Sent: Monday, January 17, 2011 9:15 AM Subject: Re: [twsocket] SslWSocketServer SslWSocket

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
, 2011 11:03 AM Subject: Re: [twsocket] SslWSocketServer SslWSocket 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

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
To: ICS support mailing Subject: Re: [twsocket] SslWSocketServer SslWSocket 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

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

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread Francois PIETTE
Hello daniel, As I said before, please FIRST do the job WITHOUT SSL. You'll add SSL later. It is the same component with or without SSL. Simply the SSL code is compiled with the conditinal symbol use_ssl so that application which do not require SSL stay independent of OpenSSL and stay

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc
: [twsocket] SslWSocketServer SslWSocket Hello daniel, As I said before, please FIRST do the job WITHOUT SSL. You'll add SSL later. It is the same component with or without SSL. Simply the SSL code is compiled with the conditinal symbol use_ssl so that application which do not require SSL stay independent

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread RTT
Now, The project OverbyteIcsSrvTcp has absolutely nothing in inside to help me. I can't find anything about sending or receiving in this project. The OverbyteIcsSrvTcp uses the OverbyteIcsTcpCmd.pas, where you will find the code of the server. The project OverbyteIcsClient7 gives me

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc
The OverbyteIcsSrvTcp uses the OverbyteIcsTcpCmd.pas, where you will find the code of the server. Yes, I already knew this. Make sure you have the server running, before you hit the client connect button. Make also sure the client port is set to the same server port. The server port is set

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread RTT
It gives error when clicking the connect button What's the connect error? however, I will be able to fix the errors but, this still doesn't help me much because, I need to be able to send the commands from the server to the client as well. I can find nothing about how to send anything

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread Arno Garrels
daniel, I wish to continue with SSL if there is no difference. SSL is an add-on, so skip that for now, you have to understand the basics first . Now, The project OverbyteIcsSrvTcp has absolutely nothing in inside to help me. I can't find anything about sending or receiving in this

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc
Huch? There's method WSocket1DataAvailable that receives data and SendButtonClick that sends strings. There is no such button SendButtonClick in this project -- OverbyteIcsSrvTcp.bdsproj. Are we talking about the same project or is it something which I don't have? TCP/IP requires a

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread Francois PIETTE
I wish to continue with SSL if there is no difference. There is a difference: you introduce something in extra which has a lot of reason not to work. First thing first, start without SSL. The project OverbyteIcsSrvTcp has absolutely nothing in inside to help me. Sure it has ! It accept

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread Francois PIETTE
I need to be able to send the commands from the server to the client as well. Given a server has a lot of client (potentially), how do you select the client you want to communicate with ? Usually a server reply to a command sent by a client, but once the client is connected, the server can

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc
Assuming N is the index of the selected client, you send something using this line of code: WSocketServer.Client[N].Send(MyBufAddr, MyBufLnegth); When sending something back to a client having sent a command, you use the sender argument of the dataavailable event. This sender represent

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc
Assuming N is the index of the selected client, you send something using this line of code: WSocketServer.Client[N].Send(MyBufAddr, MyBufLnegth); When sending something back to a client having sent a command, you use the sender argument of the dataavailable event. This sender represent the

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread Francois PIETTE
When sending something back to a client having sent a command, you use the sender argument of the dataavailable event. This sender represent the client: TWSocket(Sender).Send(MyBufAddr, MyBufLnegth); I still can't find anything regarding this in existed demos/samples. In the server

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread Francois PIETTE
and it doesn't work Please be more specific. What error/exception do you have ? -- francois.pie...@overbyte.be 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