I think we will have to agree to disagree.
You can observe an open WS connection using something like wireshark. There is absolutely no request-response cycle taking place, unless you are trying to suggest that it manages to do this at an undetectable level. Why would there be, any more than there would be in a normal socket connection between two clients?
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Nathan Andelin
Sent: 11 July 2012 18:38
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Websockets on the IBMi
There is big difference between a keepalive (apache) and a websocket.
A keepalive may die ...
I'm not just talking about keepalive "on". I'm talking about Timeout "nnn", and KeepAliveTimeout "nnn". The browser and the server will maintain persistent connections for the duration of "nnn", which can be as long as you want.
If a browser issues an asynchronous request via XHR, and the socket times out on the server, the browser will just get an empty response after minutes or hours of wait. Just code to cycle another request.
a WS remains open except in case of an error and is bi-diectional.
I still stand by my earlier assertion that WS is implementing a request-response cycle under the covers.
Consider the following proof of concept which simulates 4 chat clients establishing 4 persistent connections using XHR. If you use a tool like Fiddler to measure the interval between the 1st response and the 4th response, it often is withing a millisecond or two on a LAN.
http://www.radile.com/rdweb/temp/meet.html
-Nathan
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.
--------------------------------------------------------------------------------
CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
As an Amazon Associate we earn from qualifying purchases.