Re: [twsocket] SslWSocket processing data

2011-01-19 Thread Francois PIETTE

If the SslWSocket sends command such as: “Time”,
SslWSocketServer is processing it and responding by giving the time to the 
client

(this what I have noticed in the samples).


Right.


Now,
Can the same thing be done in the other way around?
SslWSocketServer sends command such as : ”Time”,
SslWSocket answers by sending the current time to the SslWSocketServer 
after processing.


I know how to do this in some other ways but wondering if it is possible 
to do it with

the component since it is doing it in much better way.


Once the connexion is established between client and server, you have a 
bidirectional channel between both. Usualy as you have noticed in the demo, 
the client send commands and the server reply. But you can revert this. 
There is nothing special to program as far as communication is concerned. It 
is just the application logic: what does the client when it receive 
something from the server ? I can simply parse it, consider it as a command 
and send back some informations.



My question will be,
can this be done for the client side where the client receives command 
from the server,

processes it and responds to the server.


Exactly.


---
procedure TSimpleSslServerForm.ProcessData(Client: TTcpSrvClient);
var
   I   : Integer;
   P   : Pointer;
   AClient : TTcpSrvClient;
begin
   { We could replace all those CompareText with a table lookup }
---


ProcessData becomes handling (parsing) client response to previously sent 
command.


--
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 for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] SslWSocket processing data

2011-01-19 Thread daniel cc

Thank you :)
Sounds excellent.

Best regards


-Original Message- 
From: Francois PIETTE

Sent: Wednesday, January 19, 2011 7:33 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocket processing data


If the SslWSocket sends command such as: “Time”,
SslWSocketServer is processing it and responding by giving the time to the 
client

(this what I have noticed in the samples).


Right.


Now,
Can the same thing be done in the other way around?
SslWSocketServer sends command such as : ”Time”,
SslWSocket answers by sending the current time to the SslWSocketServer 
after processing.


I know how to do this in some other ways but wondering if it is possible 
to do it with

the component since it is doing it in much better way.


Once the connexion is established between client and server, you have a
bidirectional channel between both. Usualy as you have noticed in the demo,
the client send commands and the server reply. But you can revert this.
There is nothing special to program as far as communication is concerned. It
is just the application logic: what does the client when it receive
something from the server ? I can simply parse it, consider it as a command
and send back some informations.


My question will be,
can this be done for the client side where the client receives command 
from the server,

processes it and responds to the server.


Exactly.


---
procedure TSimpleSslServerForm.ProcessData(Client: TTcpSrvClient);
var
   I   : Integer;
   P   : Pointer;
   AClient : TTcpSrvClient;
begin
   { We could replace all those CompareText with a table lookup }
---


ProcessData becomes handling (parsing) client response to previously sent
command.

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

[twsocket] SslWSocket processing data

2011-01-18 Thread daniel cc
Hi guys,
If the SslWSocket sends command such as: “Time”,
SslWSocketServer is processing it and responding by giving the time to the 
client (this what I have noticed in the samples).

Now,
Can the same thing be done in the other way around?
SslWSocketServer sends command such as : ”Time”,
SslWSocket answers by sending the current time to the SslWSocketServer after 
processing.

I know how to do this in some other ways but wondering if it is possible to do 
it with the component since it is doing it in much better way.

My question will be,
can this be done for the client side where the client receives command from the 
server, processes it and responds to the server.
---
procedure TSimpleSslServerForm.ProcessData(Client: TTcpSrvClient);
var
I   : Integer;
P   : Pointer;
AClient : TTcpSrvClient;
begin
{ We could replace all those CompareText with a table lookup }
---

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