Subject: Re: [hybi] Binary/Text Distinction

From: "Bob Gezelter" <[email-masked]>
Date: Wed, 17 Aug 2011 11:22:32 -0700

John,

From this message below, it would appear that you are reading the
specification to describe a protocol where frames within a message are a
mix of text and binary frames, to wit:

    Message 1 Frame 0  Text
    Message 1 Frame 1  Text
    Message 1 Frame 2  Binary
    Message 1 (FIN Bit) Frame 3 Text

Am I interpreting your comments correctly?

- Bob Gezelter, http://www.rlgsc.com

> -------- Original Message --------
> Subject: Re: [hybi] Binary/Text Distinction
> From: John Tamplin <[email-masked]>
> Date: Tue, August 16, 2011 7:24 am
> To: Bob Gezelter <[email-masked]>
> Cc: Bjoern Hoehrmann <[email-masked]>, [email-masked]
> 
> 
> On Tue, Aug 16, 2011 at 10:21 AM, Bob Gezelter <[email-masked]> wrote:
> 
> > My objection to the distinction is that it does not, IMHO, belong in the
> > WebSocket protocol, it belongs in the next layer above the basic
> > WebSocket protocol transport layer.
> 
> 
> Then you have to provide some way for JS apps to serialize/deserialize
> arbitrary mixes of text and binary data to a binary frame to send in WS.  It
> might be possible to standardize on such a thing and make sure it is robust
> against hostile JS, but given how long WS has been in development it seems
> prudent to avoid making such a mechanism a blocker for deploying WS.
> 
> -- 
> John A. Tamplin
> Software Engineer (GWT), Google

---

From: John Tamplin <[email-masked]>
Date: Wed, 17 Aug 2011 14:38:19 -0400

> Am I interpreting your comments correctly?

No, message 1 might be binary and message 2 might be text.  Within a
message, the opcode is only on the first frame, so all frames of one message
must be of the same type.