× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott,

I launched WireShark again to watch TCP/IP traffic between my PC and my IBM i server, and I now see what you're talking about. HTTP connections may be persistent, and still generate periodic TCP keep-alive activity. Interestingly, my Telnet client (TN5250J) generates a lot more frequent chatter than my browser (Chrome), from persistent but otherwise idle connections.

Keep-alive requests still don't account for the other activity between the Web Socket client and server at http://jwebsocket.org, but you have a point. I'll keep watching.

Again, I'm not dissing Web Sockets. They sound like a great interface. I just want to understand the front-end and back-end before adding to the hype.

-Nathan.





----- Original Message -----
From: Scott Klement <web400@xxxxxxxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Cc:
Sent: Wednesday, July 11, 2012 5:18 PM
Subject: Re: [WEB400] Websockets on the IBMi

Nathan,

TCP keep-alive packets are used to test whether a connection is still
alive, or whether it has been disconnected.

In the olden days, a direct cable would be connected between computers
(for example, RS-232, Parallel, Twinax, etc).  If the connected device
was on, there'd be electricity on the cable.  If the device was
disconnected for any reason, the electricity would be gone, so the host
could detect the connection disruption.  (For example, if a fuse was
blown, or the cable was cut.)

However, with TCP/IP networks there's no equivalent.  A packet (SYN) is
set to indicate the start of the connection, another (FIN) is sent to
end the connection.  (I'm oversimplfiying, but you get the idea).
Multiple intermediate packets are sent to send data.

But, if a fuse blows, or the cable is cut, the computer goes down
without ever sending a FIN. How can one computer ever detect that the
other computer has disconnected?  It can't tell the difference between
the remote computer being "idle" (not sending anything) and an
unexpected disruption (power loss, cable damage, etc).

That's what keep-alive packets are for.  They are sent and acknowledged
periodically to detect whether the connection was dropped.

Note that this is done at a very low-level (inside the TCP/IP stack).
It's not really part of Websockets.  Keep-alives can be enabled on any
TCP connection, including PC5250, HTTP, SMTP, XMLHTTPReq,... anything...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.