Change the $mask value.
All messages from the client must be masked.
New exception: CloseError.

When thrown from the a protocol implementation, will close the
socket connection in the server or the client with the right code.
Ensure that the mask is well-formed.
Mask all the sent messages.
Use OpenSSL for strong random bytes if available.

Quoting the RFC:

    > The masking key is a 32-bit value chosen at random by the client.
    > When preparing a masked frame, the client MUST pick a fresh
    > masking key from the set of allowed 32-bit values. The masking
    > key needs to be unpredictable; thus, the masking key MUST be
    > derived from a strong source of entropy, and the masking key for a
    > given frame MUST NOT make it simple for a server/proxy to predict
    > the masking key for a subsequent frame. The unpredictability of
    > the masking key is essential to prevent authors of malicious
    > applications from selecting the bytes that appear on the wire.
    > RFC4086 discusses what entails a suitable source of entropy for
    > security-sensitive applications.
[auto] Merge from Websocket

    • #93d8789 — Change the $mask value. (Ivan Enderlin, 2014-07-03)
    • #80319c5 — All messages from the client must be masked. (Ivan Enderlin, 2014-07-06)
    • #b87cf83 — New exception: CloseError. (Ivan Enderlin, 2014-07-06)
    • #7b4b11c — Ensure that the mask is well-formed. (Ivan Enderlin, 2014-07-06)
    • #17279f3 — Mask all the sent messages. (Ivan Enderlin, 2014-07-06)
    • #9a6d6c7 — Use OpenSSL for strong random bytes if available. (Ivan Enderlin, 2014-07-06)

---

Merge branch 'master' of /var/lib/git/repositories/Library/Websocket