Re: [hybi] Changed framing

Greg Wilkins <gregw@webtide.com> Fri, 06 August 2010 01:20 UTC

Return-Path: <gregw@webtide.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 9A1C13A68BC for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 18:20:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.748
X-Spam-Level:
X-Spam-Status: No, score=-1.748 tagged_above=-999 required=5 tests=[AWL=0.229, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 c6y8VUY3g9zY for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 18:20:43 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id 7BAE23A6782 for <hybi@ietf.org>; Thu, 5 Aug 2010 18:20:43 -0700 (PDT)
Received: by fxm16 with SMTP id 16so2941772fxm.31 for <hybi@ietf.org>; Thu, 05 Aug 2010 18:21:13 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.123.79 with SMTP id o15mr11866122far.12.1281057673623; Thu, 05 Aug 2010 18:21:13 -0700 (PDT)
Received: by 10.223.57.12 with HTTP; Thu, 5 Aug 2010 18:21:13 -0700 (PDT)
In-Reply-To: <Pine.LNX.4.64.1008060038340.5947@ps20323.dreamhostps.com>
References: <Pine.LNX.4.64.1008060038340.5947@ps20323.dreamhostps.com>
Date: Fri, 06 Aug 2010 11:21:13 +1000
Message-ID: <AANLkTimSFH1so6Ku4cFV1F0sU74ZE2SbwDoYQ7+0Lesj@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Ian Hickson <ian@hixie.ch>
Content-Type: text/plain; charset="UTF-8"
Cc: hybi@ietf.org
Subject: Re: [hybi] Changed framing
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, 06 Aug 2010 01:20:44 -0000

On 6 August 2010 10:41, Ian Hickson <ian@hixie.ch> wrote:
>
> I've changed the WebSocket protocol's framing to use a 64 bit length
> prefix instead of the combination of sentinel-based framing and
> variable-width lengths that we had before.

Ha! just as I was almost convinced of  variable length!

But unfortunately I have a quibble.  While I appreciate the sentiment
of making to so big that it should not be a problem, I think 64 bits
is perhaps a little too big.  The language I use (java) doesn't have
an unsigned 64 bit integer and I suspect there are other environments
which will also have difficulties with such a value.

Perhaps it should be 63 (or 31) bits, and the high bit is used for the
fragmentation bit.  This would help avoid errors associated with
signed types being used for the signed value.

regards