Subject: [hybi] Ping and Pong control frames in 06

From: Salvatore Loreto <[email-masked]>
Date: Wed, 2 Mar 2011 16:00:40 +0200

Hi there

I think the text about Ping, Pong control frames in 06 needs to be 
improved/clarified.
At moment the only text is the following:

4.5.2.  Ping

    The Ping message contains an opcode of 0x02.

    Upon receipt of a Ping message, an endpoint MUST send a Pong message
    in response.  It SHOULD do so as soon as is practical.  The message
    bodies of the Ping and Pong MUST be the same.

I would propose to change the second paragraph in this way:

/   Upon sent of a Ping message, an endpoint MUST expect a Pong message
    in response. The message bodies of the Ping and Pong MUST be the same./

open issues #1: how long the end point has to wait before recognize the 
other peer is gone?

open issues #2: what should do if the end point does not receive back a 
Pong (in a reasonable amount of time)?
     that is something I would like to be described in the specification.
     Do we need to specify an ad-hoc status code in the close frame for 
this particular case?

4.5.3.  Pong

    The Pong message contains an opcode of 0x03.

    Upon receipt of a Ping message, an endpoint MUST send a Pong message
    in response.  It SHOULD do so as soon as is practical.  The message
    bodies of the Ping and Pong MUST be the same.  A Pong is issued only
    in response to the most recent Ping.

cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com

---

From: Gabriel Montenegro <[email-masked]>
Date: Wed, 2 Mar 2011 19:04:08 +0000

I don't like "MUST expect". I much prefer normative language around observable on-the-wire behavior. The question to ask is whether it is easy to translate into a test case. So the previous "...MUST send a Pong message..." is better, easily observable and testable.

I much prefer the current paragraph instead of the proposed change.

From: [email-masked] [mailto:[email-masked]] On Behalf Of Salvatore Loreto
Sent: Wednesday, March 02, 2011 06:01
To: [email-masked]
Subject: [hybi] Ping and Pong control frames in 06

Hi there

I think the text about Ping, Pong control frames in 06 needs to be improved/clarified.
At moment the only text is the following:

4.5.2.  Ping

   Upon sent of a Ping message, an endpoint MUST expect a Pong message
   in response. The message bodies of the Ping and Pong MUST be the same.

open issues #1: how long the end point has to wait before recognize the other peer is gone?

open issues #2: what should do if the end point does not receive back a Pong (in a reasonable amount of time)?
    that is something I would like to be described in the specification.
    Do we need to specify an ad-hoc status code in the close frame for this particular case?

4.5.3.  Pong

cheers
/Sal

--

Salvatore Loreto

www.sloreto.com<http://www.sloreto.com>

---

From: Scott Ferguson <[email-masked]>
Date: Wed, 02 Mar 2011 11:22:07 -0800

On 03/02/2011 11:04 AM, Gabriel Montenegro wrote:
>
> I don't like "MUST expect". I much prefer normative language around 
> observable on-the-wire behavior. The question to ask is whether it is 
> easy to translate into a test case. So the previous "...MUST send a 
> Pong message..." is better, easily observable and testable.
>

I'd also prefer the current language.

An early discussion of keepalives suggested unidirectional keepalives as 
a better solution for some contexts (possibly some mobile applications 
for saving battery?), and I thought one of the reasons for the PING/PONG 
was to allow for unsolicited PONGs to implement that unidirectional 
heartbeat.

Was that idea abandoned?

-- Scott

> *From:[email-masked] [mailto:[email-masked]] *On Behalf 
> Of *Salvatore Loreto
> *Sent:* Wednesday, March 02, 2011 06:01
> *To:* [email-masked]
> *Subject:* [hybi] Ping and Pong control frames in 06
>
> Hi there
>
> www.sloreto.com  <http://www.sloreto.com>
>
>
> _______________________________________________
> hybi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hybi

---

From: Salvatore Loreto <[email-masked]>
Date: Wed, 2 Mar 2011 21:51:20 +0200

my point was that in the 4.5.2 Ping section I expect to read something 
relate to
1) what the Ping is for
2) what should do a peer after have sent a PING
     2.1) wait for a certain amount of time (we can specify it or leave 
it unspecified both are OK for me)
     2.1) what to do if a PONG is not received

so whatever is the text the two open issues I have described below still 
have to be addressed in the text

On 3/2/11 9:04 PM, Gabriel Montenegro wrote:
>
> I don’t like “MUST expect”. I much prefer normative language around 
> easy to translate into a test case. So the previous “…MUST send a Pong 
> message…” is better, easily observable and testable.
>