- add sources.
[platform/framework/web/crosswalk.git] / src / net / websockets / websocket_mux.h
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_WEBSOCKETS_WEBSOCKET_MUX_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_MUX_H_
7
8 namespace net {
9
10 // Reason codes used by the mux extension.
11 enum WebSocketMuxError {
12   // Codes starting with 2000 apply to the physical connection. They are used
13   // for dropping the control channel.
14   kWebSocketMuxErrorPhysicalConnectionFailed = 2000,
15   kWebSocketMuxErrorInvalidEncapsulatingMessage = 2001,
16   kWebSocketMuxErrorChannelIdTruncated = 2002,
17   kWebSocketMuxErrorEncapsulatedFrameIsTruncated = 2003,
18   kWebSocketMuxErrorUnknownMuxOpcode = 2004,
19   kWebSocketMuxErrorInvalidMuxControlBlock = 2005,
20   kWebSocketMuxErrorChannelAlreadyExists = 2006,
21   kWebSocketMuxErrorNewChannelSlotViolation = 2007,
22   kWebSocketMuxErrorNewChannelSlotOverflow = 2008,
23   kWebSocketMuxErrorBadRequest = 2009,
24   kWebSocketMuxErrorUnknownRequestEncoding = 2010,
25   kWebSocketMuxErrorBadResponse = 2011,
26   kWebSocketMuxErrorUnknownResponseEncoding = 2012,
27
28   // Codes starting with 3000 apply to the logical connection.
29   kWebSocketMuxErrorLogicalChannelFailed = 3000,
30   kWebSocketMuxErrorSendQuotaViolation = 3005,
31   kWebSocketMuxErrorSendQuotaOverflow = 3006,
32   kWebSocketMuxErrorIdleTimeout = 3007,
33   kWebSocketMuxErrorDropChannelAck = 3008,
34   kWebSocketMuxErrorBadFragmentation = 3009,
35 };
36
37 }  // namespace net
38
39 #endif  // NET_WEBSOCKETS_WEBSOCKET_MUX_H_