Re: [hybi] Multiplexing - closing a logical channel

Takeshi Yoshino <tyoshino@google.com> Mon, 18 March 2013 06:15 UTC

Return-Path: <tyoshino@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9B6AC21F866F for <hybi@ietfa.amsl.com>; Sun, 17 Mar 2013 23:15:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.977
X-Spam-Level:
X-Spam-Status: No, score=-101.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, NO_RELAYS=-0.001, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Klj6VULOU0aL for <hybi@ietfa.amsl.com>; Sun, 17 Mar 2013 23:15:16 -0700 (PDT)
Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) by ietfa.amsl.com (Postfix) with ESMTP id 9DC6021F8621 for <hybi@ietf.org>; Sun, 17 Mar 2013 23:15:15 -0700 (PDT)
Received: by mail-we0-f180.google.com with SMTP id k14so4417363wer.25 for <hybi@ietf.org>; Sun, 17 Mar 2013 23:15:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=PzKSu+h2Sow8wdUPQ92ZzXjUNffzMmBTfPTsex2+Q+8=; b=Em5fNNT14fWYUfydzGYiJD7zAyOLX9gw47UvaqbZjKW8VqhxTrFmr+zWYWOYJlQzWb 5/Qe7FzbrheHR87bu3zobIJ5gppXTopy68WLIMSK/F4+SWLGRiTlOmx9k8Pz6ENFSX7W AMGudYMTQ8lOhSZ86FfuaBjSht6TTF/5grO/q3Iiu1PNFZLIS0KJb7W1KDL4RQKt68cw krh3WlgNBQ8V0q+XsYoo0TsiGww0gMsOhBW51EaErOwk/mBHS+7XkfSp/4RcrtBVxeTI /W0NX2J3OIOYWxLafQZuh4BQFc1WbrKNvEXJHlFcJ4ZjYi9SBEw6gDPGIrHvJep0ghkE C5qQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=PzKSu+h2Sow8wdUPQ92ZzXjUNffzMmBTfPTsex2+Q+8=; b=VoUjrvai0eSowhMM2H+SqDE6P+xLUc+MupJpY9DSGDpA7RjgQrJ+3fuGK0lpLKcPOX Rd5YZkoa9s6RYGBoog1RBJMiTqjv5fAchL3CHGS0Z9yjIWMZfKMKpjnLfD9AYW0EwAfD J5NqkqK+n+CvUFnYzVeGzzHwK+z9uwpSdcHZ5OmGAvOYw6dk5nDqOHX2kliDJ/71Ri5n BwrXo9KHMx2jt5JlRPpymsKozKI8Kwehp3ed2w6v6bym0XoTEiT16qijTm2RvoW8RTSm 11slf9W7GVKVaOguo9V9+MxPlyxd0TieelTN4QFxGsYK0DO0Lsx6sxPxIs3hnsCtUCzV dq/w==
X-Received: by 10.180.94.135 with SMTP id dc7mr8352447wib.11.1363587314518; Sun, 17 Mar 2013 23:15:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.194.234.198 with HTTP; Sun, 17 Mar 2013 23:14:54 -0700 (PDT)
In-Reply-To: <CACuKZqEhSD6DEY=N9Qo=f-9QdM5miCBad3Qc6WVGqdK2=NHBRA@mail.gmail.com>
References: <CACuKZqHvd64ZfPNNK2Ov=QqXRqbgN5YaWYiBO6Ka-JWg2N5tzw@mail.gmail.com> <CAH9hSJbP-774Jg4HjJr_3FqxAy+yjZznOME-jk8BS7CYjJqFxQ@mail.gmail.com> <CACuKZqEhSD6DEY=N9Qo=f-9QdM5miCBad3Qc6WVGqdK2=NHBRA@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Mon, 18 Mar 2013 15:14:54 +0900
Message-ID: <CAH9hSJZ5LZOufSaevvh-Qy6TpM+O_B6oDtWcgK7L=8eRmAEGbg@mail.gmail.com>
To: Zhong Yu <zhong.j.yu@gmail.com>
Content-Type: multipart/alternative; boundary="f46d04462e7a80a1c104d82ce98d"
X-Gm-Message-State: ALoCoQnJSas4GDVwYKP0eRvHj+K5Hu5GmOQIfmBc/h2cjOg9ypSbNMf0tXTvldbCFBZjtJkiN5X4muZqe8TpEPaAh2tCrKKliP6Ne0ZLTNT8JJVYKCI9Y9LfFB7ke7A3u0+AEJKvk53XRV3NjmPEGjJNUNBMZ547EzOZ5POpwPHRcM0R1J6yWac/mdMphixbbvMdkPaUM120
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Multiplexing - closing a logical channel
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Mon, 18 Mar 2013 06:15:16 -0000

I don't remember if it was intentionally made to be "data ...".

But,

One of the reason why we exchange close frames is that
- some TCP stacks send an RST when a socket is closed without fully reading
received data from it
- some TCP stacks throw away received data when received an RST
- so, to close a socket without impeding the peer from reading all of
successfully received data, an endpoint needs to know that there's no data
left in its socket

If TCP FIN (EoF) works well, we can use it. But it's not always available
and reliable. So, closing frame was introduced as a reliable method to
signal the end of data on WebSocket layer.

To realize this goal, control frames also may not be sent.


On Sat, Mar 16, 2013 at 12:42 AM, Zhong Yu <zhong.j.yu@gmail.com> wrote:

> Got it, thanks.
>
> Another question,
>
> http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17#section-5.5.1
>
> 5.5.1. Close
>    The application MUST NOT send any more data frames after sending a
>    close frame.
>
> doe it imply that more control frames may be sent after a close frame?