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

Zhong Yu <zhong.j.yu@gmail.com> Fri, 28 February 2014 20:46 UTC

Return-Path: <zhong.j.yu@gmail.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 0EA831A0238 for <hybi@ietfa.amsl.com>; Fri, 28 Feb 2014 12:46:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 28xKE9Oj6sW2 for <hybi@ietfa.amsl.com>; Fri, 28 Feb 2014 12:46:02 -0800 (PST)
Received: from mail-oa0-x235.google.com (mail-oa0-x235.google.com [IPv6:2607:f8b0:4003:c02::235]) by ietfa.amsl.com (Postfix) with ESMTP id 0E5F61A0316 for <hybi@ietf.org>; Fri, 28 Feb 2014 12:46:02 -0800 (PST)
Received: by mail-oa0-f53.google.com with SMTP id j17so78215oag.12 for <hybi@ietf.org>; Fri, 28 Feb 2014 12:46:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2RzHIffxC/MaetI6J2Y+VtUWz4fyB/XeRvL0n/MxMFs=; b=QmSrvCw3QDbWBNL3ZqSdTK1BkaXuZ4pYVY1oilUR6Xbrrmi9M8+MAC5KeTOHZS3/bc DY70oOfV7yZrcG2oux3auhr4V6H5OizB/qTzVIBsaudLIi3r8FDNjnp44msg+slhwje1 pECzuoj79zLLzEGbkJCtdYq3RBTTiHHBUdWY4wCBS9lctOntA4D2Oq6GP1ypkglpkZEi qeNLXQbXFbzmhYRk5cydeaDyeF3xRwEyi9ySGpeDSbf2vMPYepjTem7fxsX4kHH9O+oU i/B8FcsA/vhEwIX0fzbTziNtJg4tMnYzpYyd5zc4qgmycet0lzv7eJruiRoMRscTbxS9 wQ/g==
MIME-Version: 1.0
X-Received: by 10.60.52.241 with SMTP id w17mr4739672oeo.4.1393620360066; Fri, 28 Feb 2014 12:46:00 -0800 (PST)
Received: by 10.76.106.162 with HTTP; Fri, 28 Feb 2014 12:45:59 -0800 (PST)
In-Reply-To: <alpine.DEB.2.00.1402261734120.31525@ps20323.dreamhostps.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> <alpine.DEB.2.00.1402261734120.31525@ps20323.dreamhostps.com>
Date: Fri, 28 Feb 2014 14:45:59 -0600
Message-ID: <CACuKZqGQ6s9qFDuLL_95J+RpDSZ2cZWcESM_z=WgoUjbLHwrNw@mail.gmail.com>
From: Zhong Yu <zhong.j.yu@gmail.com>
To: Ian Hickson <ian@hixie.ch>
Content-Type: text/plain; charset="ISO-8859-1"
Archived-At: http://mailarchive.ietf.org/arch/msg/hybi/b3m-2L8IXb9NiNXr2JGS8__bx3I
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: Fri, 28 Feb 2014 20:46:04 -0000

On Wed, Feb 26, 2014 at 11:35 AM, Ian Hickson <ian@hixie.ch> wrote:
> On Wed, 26 Feb 2014, Takeshi Yoshino wrote:
>>
>> 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.
>
> If it doesn't allow it, then it's not allowed.
>
> If you send a bunch of messages, then start the closing handshake, then
> the messages should all be sent.

I think this is a good choice for most use cases. But eventually
someone will need the feature of abort/cancel an outgoing message that
takes too long to transmit.

If write() is a blocking method, it makes sense that close() after
write() should flush the data at best effort. But here write() is a
non-blocking, async method, it's not intuitively clear what should
happen if close() is called when a write action is still ongoing.

Zhong Yu


> I don't think there's anything in either
> spec that would allow the handshake to jump ahead.


>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'