Subject: [hybi] masked frames

From: Justin Lee <[email-masked]>
Date: Mon, 21 Feb 2011 17:23:13 -0500

When the client sends the frames it has to mask the data.  But is the whole
frame masked?  or just the payload/application data?  In the case of the
former then, we'd send the 4 bytes for the mask, then the XORed bytes of the
entire frame including all the opcodes and frame length bytes as well, yes?
 In this case, masked or not, the frame structure won't change, it will just
have a envelope, so to speak, wrapping it on the wire.  Is that correct?

-- 
You can find me on the net at:
http://antwerkz.com
http://www.linkedin.com/in/justinlee
http://www.twitter.com/evanchooly

---

From: Andy Green <[email-masked]>
Date: Tue, 22 Feb 2011 08:11:26 +0000

On 02/21/2011 10:23 PM, Somebody in the thread at some point said:

Hi -

> When the client sends the frames it has to mask the data.  But is the
> whole frame masked?  or just the payload/application data?  In the case
> of the former then, we'd send the 4 bytes for the mask, then the XORed
> bytes of the entire frame including all the opcodes and frame length
> bytes as well, yes?  In this case, masked or not, the frame structure
> won't change, it will just have a envelope, so to speak, wrapping it on
> the wire.  Is that correct?

Yeah.  Considering frames from the client, only the 4-byte frame key is 
unmasked, then everything is XORed using it.

Frames from the server don't have the 4-byte frame key or any masking 
action, but are otherwise the same header structure in clear.

-Andy

---

From: Justin Lee <[email-masked]>
Date: Tue, 22 Feb 2011 10:23:10 -0500

Great.  That's what I built yesterday and i'm pushing upwards of 90k/frames
a sec to/from the server.  It wasn't quit the hit I was afraid it'd be.
 Thanks for the confirmation.

---

From: Andy Green <[email-masked]>
Date: Tue, 22 Feb 2011 15:26:45 +0000

On 02/22/2011 03:23 PM, Somebody in the thread at some point said:

> Great.  That's what I built yesterday and i'm pushing upwards of
> 90k/frames a sec to/from the server.  It wasn't quit the hit I was
> afraid it'd be.  Thanks for the confirmation.

FWIW if you're hurting for a different -05 peer consider

  http://git.warmcat.com/cgi-bin/cgit/libwebsockets/

It has stuff line ping applet and clients that can do -05.

-Andy

---

From: Justin Lee <[email-masked]>
Date: Tue, 22 Feb 2011 10:36:01 -0500

I've actually been needing an external codebase to verify mine.  I'll check
that out.  Hopefully licensing issues won't get in the way of using
*something*.  Manually checking using browsers is tedious at best.  :)
 Thanks for the heads up.