Prefer // comments over #if 0.

This commit is contained in:
David Baird
2013-09-27 04:04:36 -06:00
parent 9b7a5c9575
commit 09c3ba8054
+20 -22
View File
@@ -66,28 +66,26 @@ struct _DummyWebSocket : public WebSocket
struct _RealWebSocket : public WebSocket struct _RealWebSocket : public WebSocket
{ {
#if 0 // http://tools.ietf.org/html/rfc6455#section-5.2 Base Framing Protocol
http://tools.ietf.org/html/rfc6455#section-5.2 Base Framing Protocol //
// 0 1 2 3
0 1 2 3 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 // +-+-+-+-+-------+-+-------------+-------------------------------+
+-+-+-+-+-------+-+-------------+-------------------------------+ // |F|R|R|R| opcode|M| Payload len | Extended payload length |
|F|R|R|R| opcode|M| Payload len | Extended payload length | // |I|S|S|S| (4) |A| (7) | (16/64) |
|I|S|S|S| (4) |A| (7) | (16/64) | // |N|V|V|V| |S| | (if payload len==126/127) |
|N|V|V|V| |S| | (if payload len==126/127) | // | |1|2|3| |K| | |
| |1|2|3| |K| | | // +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
+-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + // | Extended payload length continued, if payload len == 127 |
| Extended payload length continued, if payload len == 127 | // + - - - - - - - - - - - - - - - +-------------------------------+
+ - - - - - - - - - - - - - - - +-------------------------------+ // | |Masking-key, if MASK set to 1 |
| |Masking-key, if MASK set to 1 | // +-------------------------------+-------------------------------+
+-------------------------------+-------------------------------+ // | Masking-key (continued) | Payload Data |
| Masking-key (continued) | Payload Data | // +-------------------------------- - - - - - - - - - - - - - - - +
+-------------------------------- - - - - - - - - - - - - - - - + // : Payload Data continued ... :
: Payload Data continued ... : // + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // | Payload Data continued ... |
| Payload Data continued ... | // +---------------------------------------------------------------+
+---------------------------------------------------------------+
#endif
struct wsheader_type { struct wsheader_type {
unsigned header_size; unsigned header_size;
bool fin; bool fin;