|
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.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.