[twsocket] SslWSocketServer and SslWSocket KEEPALIVE

2011-01-19 Thread daniel cc
Hi guys,
Could you please inform,
What is the best way to use in order to be able to keep alive both server and 
client?
I would like to keep them both alive.

Is it custom? or systemon? or off?
How about interval?

Thanks

-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


Re: [twsocket] SslWSocketServer and SslWSocket KEEPALIVE

2011-01-19 Thread Angus Robertson - Magenta Systems Ltd
 What is the best way to use in order to be able to keep alive both 
 server and client?

Only the client matters, ignore the server.  Just design your protocol so
the client sends regular packets, at least one every five minutes, I sent
them each minute, with the server returning an acknowledgement packet (as
I've explained twice already) that the client checks.  

If the server does not receive packets for say three times the interval,
it forcibly closes the connection.  If the client does not get a response,
it retries, then closes the connection and retries.   

Angus

--
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] SslWSocketServer and SslWSocket KEEPALIVE

2011-01-19 Thread daniel cc

Thanks Angus,
I think five minutes will be just good for me :)

What is the best way to use in order to be able to keep alive both 
server and client?


Only the client matters, ignore the server.  Just design your protocol so
the client sends regular packets, at least one every five minutes, I sent
them each minute, with the server returning an acknowledgement packet (as
I've explained twice already) that the client checks.  


If the server does not receive packets for say three times the interval,
it forcibly closes the connection.  If the client does not get a response,
it retries, then closes the connection and retries.   


--
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 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] SslWSocketServer GET REMOTE COMPUTER NAME

2011-01-19 Thread daniel cc
Hi guys,
Is there any built in procedure for getting the remote computer’s name?
if not,
I will get the computer name from the client site and send it to the server as 
command when the connection is made.

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