Re: [hybi] Straw poll: Do you miss interjectable WebSocket level control frame? (was: Re: Discontinuation of mux ...)

Takeshi Yoshino <tyoshino@google.com> Tue, 25 February 2014 22:09 UTC

Return-Path: <tyoshino@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1726B1A07B3 for <hybi@ietfa.amsl.com>; Tue, 25 Feb 2014 14:09:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.925
X-Spam-Level:
X-Spam-Status: No, score=-1.925 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.547, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0vo2KoWIIpn8 for <hybi@ietfa.amsl.com>; Tue, 25 Feb 2014 14:08:58 -0800 (PST)
Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [IPv6:2a00:1450:400c:c03::232]) by ietfa.amsl.com (Postfix) with ESMTP id D93771A0298 for <hybi@ietf.org>; Tue, 25 Feb 2014 14:08:57 -0800 (PST)
Received: by mail-we0-f178.google.com with SMTP id q59so976250wes.9 for <hybi@ietf.org>; Tue, 25 Feb 2014 14:08:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=9F+kOiHi0C7z0UpQWBlzdHNCt9Fp+iUwhtqduZyc+jY=; b=dvycqk6okVQ/GKnUHEcVMG81au81LuvIS4U80wJE8ZFVRYC2BMEBeetPUI62sWhN3a SSo8dk6nu0F7jYcdx34DIHO61//3u0vdH+YwZMdLP6vokufvjIfG/Sg3ftWU4Znfg2iz RhmVwrDYNmHO5ms5jRf5EVmfbZX9c1j0Fzsw4TxCkVP+xykndeuNreLmoy+3Rhfuh1qG /dcvZHACBhRrtCYYeilkL92h+KTXrLQ9jRkd66KwfuP9bve++wLqftKRDPxU7+gACCvA JBQZ2uDdGiLeJsR1HVN4VgR/3KJmhae7mo8TdyEa4m13jgYpSCZemkZcJj+wG0JQCj61 vbBw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=9F+kOiHi0C7z0UpQWBlzdHNCt9Fp+iUwhtqduZyc+jY=; b=Ci37nAljGQQYC/3lv1uKf9PVnvrV848Ngc2z04STE/9eSAiiraqJGymopMaTSUdB/e stsH+y+yGn8S0J5gfUKZkMV75JzL9ozWL0dy+4Jh5Ip3KtM1p/ZrPehbye2JwasYc3Mk ycpdSRsjxIvSdt5d3Jfn352xwK2+ZqVwoU07eq6hF/04HU1jjr1yNyLXZknsrIvIFsFN v8wiQi4b/cRbzJM4NrVC0xcYDHsFt9Tkdd+HK7Co+AruzjOzfBw5I34nDh4eGrMIRo1g 9hpNs8APcD0OkjJ8Rp/Ol6l3KUL0oqB0nwMFzkm/6sOD+VOQt8fc5uc3wu8l1NcWOxsz 5oqA==
X-Gm-Message-State: ALoCoQlevCRxsQARExHMubzQLE3Gsa4pk7mzv4r54f3rB3S03FnsAW/90hQp7jxHzZ2re5nC8yu3SkMoDVPj7Re+dv7BTeZpNGJvXjhTgV8nNFYUC1j+3yl84ldb/WnaPOXbI2hCyX0EsdcL3QL50IYzdit5QNwZIfXAJY0j1fPGtVqyRMRwIFBNweTrtkT9sTGOY4F62HZM
X-Received: by 10.180.19.138 with SMTP id f10mr5166934wie.11.1393366136420; Tue, 25 Feb 2014 14:08:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.194.8.231 with HTTP; Tue, 25 Feb 2014 14:08:36 -0800 (PST)
In-Reply-To: <CAH9hSJbSfQ2Abp6oLifi0dx4TZENzm2QRn8zMQfAv=vw+H12sw@mail.gmail.com>
References: <CAH9hSJbjQNKnZTJmBFtU8MgmnRTYjPopC4oP_78bWUGap-9CvA@mail.gmail.com> <CAH9hSJbBmvNPBSSAk-khdWXgWw0GTt0FG3KsdzYeJcfiAPDk0A@mail.gmail.com> <CAHixhFq=wfmYH8-ij_WtsQLN=NUTJwRQ=k8jCPepQDM8V8ZZYA@mail.gmail.com> <CABihn6EN7V6XEwf6NWn78orxvr3XjGHxROJC4JjQ6RYYKEeCug@mail.gmail.com> <CACuKZqHNoR5GQmWyzbXAszZCOT2P4pjSmT3SF6ZG3X7hTY=1xw@mail.gmail.com> <CABihn6GC4VM2AHza-F7ML=FfHLZu7FNqx+BhbuVsfJLWk0P92w@mail.gmail.com> <CAH9hSJbSfQ2Abp6oLifi0dx4TZENzm2QRn8zMQfAv=vw+H12sw@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Wed, 26 Feb 2014 07:08:36 +0900
Message-ID: <CAH9hSJZ9jsp4K7vJ1ZuD1o1HXBtFJwCr_oLMr-mrvH9hAUTVDA@mail.gmail.com>
To: Yutaka Hirano <yhirano@chromium.org>, Ian Hickson <ian@hixie.ch>
Content-Type: multipart/alternative; boundary="bcaec53d550d9a8d1404f3425565"
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/MgxBf7wOPlebh64Ae4346LNgQPo
Cc: "hybi@ietf.org" <hybi@ietf.org>, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] Straw poll: Do you miss interjectable WebSocket level control frame? (was: Re: Discontinuation of mux ...)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
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: Tue, 25 Feb 2014 22:09:01 -0000

On Wed, Feb 26, 2014 at 7:05 AM, Takeshi Yoshino <tyoshino@google.com>wrote:

> On Tue, Feb 25, 2014 at 5:27 PM, Yutaka Hirano <yhirano@chromium.org>wrote:
>
>> Shouldn't ws.close() allow queued messages to be flushed before the
>>> actual closing?
>>
>> It is allowed to wait until the endpoint finishes sending the message.
>> Is it the desired behavior? I thought it is undesired, but I'm not
>> confident now.
>>
>
> I think it's underspecified. In the WHATWG WebSocket API spec, close() is
> required to "start the WebSocket closing handshake". RFC 6455 neither says
> the algorithm may terminate ongoing "Send a WebSocket Message" algorithm
> nor says it may not.
>
> ----
>
> Even if we allow close to terminate ongoing send, since the sender
> requests the termination explicitly and the peer replies to the close with
> a close frame after understanding the ongoing send is cancelled, it's fine
> to call it as clean close, I think.
>
> There's no way in the WebSocket API to tell that the message it is
> receiving has been cancelled to the script, but I don't think it's
> problematic. The message sending was clearly cancelled. Both side knows
> that. The receiver just won't deliver the cancelled message.
>

Also note that a close frame may be sent unsolicitedly by the peer and may
result in CloseEvent with wasClean set.