OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
11 * This program is distributed in the hope that it will be useful, | 11 * This program is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this program; see the file COPYING.LIB. If not, write to | 17 * along with this program; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 * | 20 * |
21 */ | 21 */ |
22 | 22 |
23 #include "config.h" | 23 #include "config.h" |
24 | 24 |
25 #include "modules/websockets/WebSocketFrame.h" | 25 #include "modules/websockets/WebSocketFrame.h" |
26 | 26 |
27 #include "wtf/CryptographicallyRandomNumber.h" | 27 #include "wtf/CryptographicallyRandomNumber.h" |
28 #include "wtf/MathExtras.h" | 28 #include "wtf/MathExtras.h" |
29 | 29 |
30 namespace WebCore { | 30 namespace blink { |
31 | 31 |
32 // Constants for hybi-10 frame format. | 32 // Constants for hybi-10 frame format. |
33 // These are bitmasks for frame composition / decomposition. | 33 // These are bitmasks for frame composition / decomposition. |
34 // Do not mistake these constants for the flags given to the WebSocketFrame cons
tructor. | 34 // Do not mistake these constants for the flags given to the WebSocketFrame cons
tructor. |
35 const unsigned char finalBit = 0x80; | 35 const unsigned char finalBit = 0x80; |
36 const unsigned char compressBit = 0x40; | 36 const unsigned char compressBit = 0x40; |
37 const unsigned char reserved2Bit = 0x20; | 37 const unsigned char reserved2Bit = 0x20; |
38 const unsigned char reserved3Bit = 0x10; | 38 const unsigned char reserved3Bit = 0x10; |
39 const unsigned char opCodeMask = 0xF; | 39 const unsigned char opCodeMask = 0xF; |
40 const unsigned char maskBit = 0x80; | 40 const unsigned char maskBit = 0x80; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 , final(flags & Final) | 188 , final(flags & Final) |
189 , compress(flags & Compress) | 189 , compress(flags & Compress) |
190 , reserved2(flags & Reserved2) | 190 , reserved2(flags & Reserved2) |
191 , reserved3(flags & Reserved3) | 191 , reserved3(flags & Reserved3) |
192 , masked(flags & Masked) | 192 , masked(flags & Masked) |
193 , payload(payload) | 193 , payload(payload) |
194 , payloadLength(payloadLength) | 194 , payloadLength(payloadLength) |
195 { | 195 { |
196 } | 196 } |
197 | 197 |
198 } // namespace WebCore | 198 } // namespace blink |
OLD | NEW |