Re: [hybi] Clarify the role of closing handshake

John Tamplin <jat@google.com> Thu, 10 February 2011 00:46 UTC

Return-Path: <jat@google.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7640C3A6827 for <hybi@core3.amsl.com>; Wed, 9 Feb 2011 16:46:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.976
X-Spam-Level:
X-Spam-Status: No, score=-102.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0+VpnM7zygIx for <hybi@core3.amsl.com>; Wed, 9 Feb 2011 16:46:21 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 040FA3A6826 for <hybi@ietf.org>; Wed, 9 Feb 2011 16:46:20 -0800 (PST)
Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id p1A0kUoR001878 for <hybi@ietf.org>; Wed, 9 Feb 2011 16:46:30 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1297298791; bh=CQLjXbXtVB/rwD7MSl05JdOBW9k=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bDWuLtFtBLTAX8fmmg86jAs4XRJFoR9I6gMksd6JwZoE2693d4SLcAHv84nQhC09V mge6Sk8+lVaYHfIKgRpcA==
Received: from yxd30 (yxd30.prod.google.com [10.190.1.222]) by kpbe18.cbf.corp.google.com with ESMTP id p1A0kSaD018411 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 9 Feb 2011 16:46:29 -0800
Received: by yxd30 with SMTP id 30so371411yxd.11 for <hybi@ietf.org>; Wed, 09 Feb 2011 16:46:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=QzF+/TvhAuGDF35GR5C8Wwmnl8bMg7GP9xmozIJPZy0=; b=PW55rNQqfmvnEUBN/C1uAyPRxAPY3fVdqKqnnBZm38BZjrSSYgNx1ismPDUMSHC4qm 6DnbgaUh02LpXTJqFCPA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=C4/4vFdyREHtoM+P16beh9DE2/KikJHDvoAeeNBFfWKyGmolBVvl1yqSyOH9n04lqh Cdr5rcVrbZJqaaYu6pgg==
Received: by 10.150.49.17 with SMTP id w17mr2378399ybw.377.1297298788392; Wed, 09 Feb 2011 16:46:28 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Wed, 9 Feb 2011 16:46:07 -0800 (PST)
In-Reply-To: <CA566BAEAD6B3F4E8B5C5C4F61710C1126E042FE@TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com>
References: <AANLkTi=wAwQHGbu_vVS5o9yNuC-M=e_hWwtU5F6UPGqm@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C1126E042FE@TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com>
From: John Tamplin <jat@google.com>
Date: Wed, 09 Feb 2011 19:46:07 -0500
Message-ID: <AANLkTikaJGknY8-urat9Vopi1TqZdzCJ9ZzGXy85Qk-p@mail.gmail.com>
To: Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
Content-Type: multipart/alternative; boundary="000e0cd6aeb4732064049be2e96a"
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Clarify the role of closing handshake
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Feb 2011 00:46:22 -0000

On Wed, Feb 9, 2011 at 7:21 PM, Gabriel Montenegro <
Gabriel.Montenegro@microsoft.com> wrote:

> +1 on Dropping feature B (data draining) and only keeping the simple
> semantics of feature A as you say below:
>
>
>
> a) peer B assume that no more data is coming from peer A when B receives
> closing initiation from A
>
>
>
> Either side has to be ready for the other side going away without warning
> (a user just yanking the page in the browser). Any value for data draining
> is suspect and better handled at the application. There may be value in
> having it as a signal to intermediaries so they can claim state earlier than
> they might have otherwise (they also have to have timeouts as they cannot
> rely on the Close message being cleanly sent), but then the simplest form is
> enough.
>
>
>
> My suggestion on Close is to simplify it along these lines:
>
>
>
> ·         Using simple close semantics (whoever sends it, closes the
> entire session).
>
> ·         No half-close semantics as in TCP
>
> ·         Assuming that any data draining must be taken care of by the
> app, so no need for acking a close.
>
> ·         Assuming that the primary purpose of a Close is to inform
> intermediaries that the session is now terminated.
>
>
>
> Proposed text is:
>
>
>
> 4.5.1.  Close
>
>
>
>    The Close message contains an opcode of 0x01 and no body.
>
>
>
>    The websocket is considered fully closed when an endpoint has either
> sent or received a Close message.
>
>    Accordingly, upon sending or receiving a Close message, no more data or
> control messages can be sent on  the websocket.
>
>
>
> Comments?
>

I would say it is fully closed when both sent and received a Close message,
or when the underlying channel is closed.

-- 
John A. Tamplin
Software Engineer (GWT), Google