Re: [hybi] Framing take IV

Greg Wilkins <gregw@webtide.com> Wed, 04 August 2010 03:32 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 4C0A73A6BA6 for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 20:32:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.719
X-Spam-Level:
X-Spam-Status: No, score=-1.719 tagged_above=-999 required=5 tests=[AWL=0.257, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
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 5mgoL2mZP-Tb for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 20:32: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 D25AD3A6BAA for <hybi@ietf.org>; Tue, 3 Aug 2010 20:32:41 -0700 (PDT)
Received: by fxm16 with SMTP id 16so1478412fxm.31 for <hybi@ietf.org>; Tue, 03 Aug 2010 20:33:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.111.137 with SMTP id s9mr8236730fap.30.1280892790252; Tue, 03 Aug 2010 20:33:10 -0700 (PDT)
Received: by 10.223.57.12 with HTTP; Tue, 3 Aug 2010 20:33:10 -0700 (PDT)
In-Reply-To: <20100804031917.GV27827@shareable.org>
References: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com> <20100804022719.GT27827@shareable.org> <AANLkTi=MENta8H4A_ota=R==EJ3j0zAkPc7ai2qmsZiT@mail.gmail.com> <AANLkTinZE8-HSi-BJD8Oq3z3+9BXY8eMnZ4DAnOaiuT=@mail.gmail.com> <20100804031917.GV27827@shareable.org>
Date: Wed, 04 Aug 2010 13:33:10 +1000
Message-ID: <AANLkTikMuVDwUyKYetCvj2GWv8dW+sWa5RLOVVOVPcBF@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: multipart/alternative; boundary="001636e0a749c22689048cf71784"
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing take IV
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: Wed, 04 Aug 2010 03:32:44 -0000

Jamie,

so to make your proposal a little more concrete, I think that you are
advocating something like:


  +--------------------------------------------------+
  | opcode (8)            |           Length(16)     |
  +--------------------------------------------------+
   |                      Data                        |
  +--------------------------------------------------+

    ws-frame            = frame-opcode
                          frame-length
                          octet-data

    frame-opcode        = %x00 ; text data frame
                        | %x01 ; final frame
                        | %x02-ff; extension frame

    frame-length        = %x0000-FFFF

    octet-data          = *( %x00-FF )


A client would indicate the extensions that it wants to support with a
handshake header like:

   Websocket-Ext: fragment;mandatory=true, ping;mandatory=true, multiplex,
compression

The server could then respond with the extensions that it will be used, plus
allocations of bits/codes:

   Wesocket-Ext: fragment;bit=7, ping;code=02-03, multiplex;code=10-1F


Is that about right?