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 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.

Here is what need to do,
When the client is connected,
It informs it's IP and connection port to the server as this: Client connected. Remote: 127.0.0.1/51665 Local: 127.0.0.1/443 I need to be able to use this information or ar least some of this information to send some commands this client.

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?

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.

Do you think I need both in both sides?
If yes,
Is it going to make any easier for me?
I need to start with sending commands but I need to send and receive files also in feature.



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()...

Sorry again for not being able to explain clearly,
There is,
.Send
.SendSTR
.SendLine

My problem is,
What is the right way and how can I get the result I need?

Best regards
--
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