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 right index is YOUR application problem. Tell me in english
how you would like to select one client among all the connected clients and
I will help you translate this specification to code.
But, are you sure you don't want to revert the client/server roles ?
It would be much simpler for you.
If the side you name "server" has to send "commands" to the side you name
"client" for execution and get back results, then what you name "server" is
actually a socket client and what you name "client" is actually a socket
server.
To say it otherwise: There is no problem having the computer you name
"server" to be an actual client - as far as socket programming is
concerned - for the computer you name as "client" which is turn would be a
server as far as socket programming is concerned.
You may also have both client and server socket at both side. By the way,
this is how FTP is working: the FTP client connect to the FTP server to send
commands (file transfert, dir list,...) to be executed by the server. When
the FTP server has to transfert a file, the (FTP) server become a (socket)
client connecting to a (server) socket located at the (FTP) client ! This
could be a scheme you could use to design your application.
SslWSocketServer1.(Sender).Send(MyBufAddr, MyBufLnegth); --> need to be
able to send the command which is typed in the "TEdit" field and I have no
idea about how this works, so far I don't even know how to handle -->
(MyBufAddr, MyBufLnegth); either.
Excuse me, don't take it worng, but I'm wondering if you know Delphi
programming or not :-(
You can see in the component source code and in the samples that Send method
takes two arguments, the first is a pointer to what you want to send and the
second is the number of bytes to send. You have a lot of ways to use that in
your software ! If you only have text to send, probably SendStr() method
will be easier for you: it take a single string type argument. Look at the
implementation to learn how SendStr() call Send()...
--
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
----- 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
-----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 being pation.
I have checked in the project the --> OnDataAvailable as you adviced and
it is absolutely same as what I also have.
What I am trying to do is,
Server is on and running, client is connected and I have the info on
"Display" which says about what client is connected etc.
Now,
How can I selected a specific client, let's say client 1 and send a
command to it?
Here is what I am trying,
SslWSocketServer1.(Sender).Send(MyBufAddr, MyBufLnegth); --> need to be
able to send the command which is typed in the "TEdit" field and I have no
idea about how this works, so far I don't even know how to handle -->
(MyBufAddr, MyBufLnegth); either.
After sending the command to the client,
Display('Command sent: ' + ledSendCommand.Text); --> ledSendCommand is a
"TLabelEdit"
-daniel
--
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
--
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