Subject: Re: [hybi] Binary/Text Distinction

From: "Bob Gezelter" <[email-masked]>
Date: Mon, 15 Aug 2011 11:34:03 -0700

John,

I do not see the need for separate opcodes for text/binary messages.

Whether a connection is binary/text is an applications protocol issue,
and should be at the level of the connection setup. At that point, the
JS API is free to enforce the restriction.

In fact, if the text/binary attribute is part of the connection's
configuration, there is zero chance of the API delivering bad data (as
opposed to relying on its counter-party to be well-behaved). I have
implemented many many interfaces over the years with similar
restrictions, without any problems. Relying on the other side of the
connection is simply less reliable.

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

> -------- Original Message --------
> Subject: Re: [hybi] Binary/Text Distinction
> From: John Tamplin <[email-masked]>
> Date: Mon, August 15, 2011 11:24 am
> To: Bob Gezelter <[email-masked]>
> Cc: [email-masked]
> 
> 
> On Mon, Aug 15, 2011 at 2:18 PM, Bob Gezelter <[email-masked]> wrote:
> 
> > I agree with I?aki that the distinction between text/binary data is
> > unnecessary.
> >
> 
> There were months of discussions about this point during the framing
> discussion.  Revisiting them at this point seems suboptimal.
> 
> Basically, the browsers need to be able to call JS code delivering the
> message, and they want a simple API for JS code to access the message.  If
> you left it up to the JS code to interpret it, then you would have to have a
> much more complicated API and you would also leave open accessing binary
> data as if it were text.
> 
> -- 
> John A. Tamplin
> Software Engineer (GWT), Google