Re: [hybi] how to improve websocket

Ian Hickson <ian@hixie.ch> Fri, 23 October 2009 03:46 UTC

Return-Path: <ian@hixie.ch>
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 CA94D3A67E5 for <hybi@core3.amsl.com>; Thu, 22 Oct 2009 20:46:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.534
X-Spam-Level:
X-Spam-Status: No, score=-2.534 tagged_above=-999 required=5 tests=[AWL=0.065, BAYES_00=-2.599]
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 1V9g-uQ9JmZy for <hybi@core3.amsl.com>; Thu, 22 Oct 2009 20:46:28 -0700 (PDT)
Received: from looneymail-a2.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id B64613A68FC for <hybi@ietf.org>; Thu, 22 Oct 2009 20:46:23 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id 2660216D3CA; Thu, 22 Oct 2009 20:46:34 -0700 (PDT)
Date: Fri, 23 Oct 2009 03:59:49 +0000
From: Ian Hickson <ian@hixie.ch>
To: Joshua Bell <josh@lindenlab.com>
In-Reply-To: <f72742de0910220939j33d9d72cudad96857b592b801@mail.gmail.com>
Message-ID: <Pine.LNX.4.62.0910230357250.9145@hixie.dreamhostps.com>
References: <4ADD2FAC.9050902@webtide.com> <f72742de0910220939j33d9d72cudad96857b592b801@mail.gmail.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] how to improve websocket
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: Fri, 23 Oct 2009 03:46:29 -0000

On Thu, 22 Oct 2009, Joshua Bell wrote:
> 
> * I seem to recall that one of the desires for sentinel-based frames was 
> to allow octet streams for which the length was not known in advance. 

No; the only reason for sentinel-based frames was to not rely on authors 
having to determine the length of their UTF-8-encoded strings, which in 
many environments can be easy to get wrong.


> * My reading of section 4.2 (supported by the non-normative section 1.2) 
> in draft-hixie-thewebsocketprotocol-50 is such that length-based binary 
> data (frame types 0x80-0xff) are actually deprecated(?) - "6.  Read 
> /length/ bytes." "7.  Discard the read bytes." - the data is never 
> actually to be interpreted by the client! (Contrast step 5 in the 
> sentinel frame section of the algorithm, which explicitly calls out when 
> to indicate a message is received or discarded)

The binary frames are in the spec for future extension. Currently 
JavaScript has no binary support so the JS API has no binary support so 
the protocol doesn't expose the binary support. It's specced as it is so 
that when we add such support, new servers won't cause old clients to 
break unexpectedly; they'll just ignore the binary frames.

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