This project is read-only.


Mar 7, 2012 at 9:08 PM

Hi.  Thank you for making this library available.  I am testing WebSocket4Net against the "WebSockets Protocol Test Suite" found at

The first problem that I encountered is that the Sec-WebSocket-Key should be a 16 byte value that is then Base64 encoded resulting in 24 bytes.  I reviewed the spec on-line and indeed this value should be 16 bytes encoded to Base64.  I modified your code accordingly and now I can continue with the validation against the test suite.

Have you guys run any tests against 3rd party test suites?



Mar 8, 2012 at 1:53 AM

Sorry, I failed to find a description about it in rfc6455:


To prove that the handshake was received, the server has to take two
   pieces of information and combine them to form a response.  The first
   piece of information comes from the |Sec-WebSocket-Key| header field
   in the client handshake:

        Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==

   For this header field, the server has to take the value (as present
   in the header field, e.g., the base64-encoded [RFC4648] version minus
   any leading and trailing whitespace) and concatenate this with the
   Globally Unique Identifier (GUID, [RFC4122]) "258EAFA5-E914-47DA-
   95CA-C5AB0DC85B11" in string form, which is unlikely to be used by
   network endpoints that do not understand the WebSocket Protocol.  A
   SHA-1 hash (160 bits) [FIPS.180-3], base64-encoded (see Section 4 of
   [RFC4648]), of this concatenation is then returned in the server's

Where did you find the spec?

Yes, Chrome send Sec-WebSocket-Key like you said, I'll change it if I find the definition.

Mar 8, 2012 at 3:10 AM

See section 4.1 of that same document -

   7.   The request MUST include a header field with the name
        |Sec-WebSocket-Key|.  The value of this header field MUST be a
        nonce consisting of a randomly selected 16-byte value that has
        been base64-encoded (see Section 4 of [RFC4648]).  The nonce
        MUST be selected randomly for each connection.
Mar 8, 2012 at 3:11 AM


Thank you, I'll fix it ASAP!

Mar 8, 2012 at 4:27 AM

This bug has been fixed in the latest change.

Thank you for your helping!

Mar 8, 2012 at 5:13 PM

Thank you for the quick response.  This part is working fine for me now.  You might want to look at the test suite -  A couple of the tests cause a crash down at the SuperSocket level.

Mar 9, 2012 at 1:14 AM

Ok, thank you very much!

Mar 9, 2012 at 1:58 AM

Oh, I failed to play with autobahn, I cannot find the

Mar 11, 2012 at 4:20 PM

The test suit works for me.

SuperWebSocket will not crash because of the tests, just there is a maxCommandLength configuration doesn't allow requests longer than that limitation.

Now, SuperWebSocket pass the most test cases of autobahn test suite, please download the latest code of SuperWebSocket.