Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Side by Side Diff: net/websockets/websocket_errors.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/websockets/websocket_end_to_end_test.cc ('k') | net/websockets/websocket_errors.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_ERRORS_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_
7
8 #include "net/base/net_errors.h"
9
10 namespace net {
11
12 // Reason codes used with close messages. NoStatusReceived,
13 // AbnormalClosure and TlsHandshake are special in that they
14 // should never be sent on the wire; they are only used within the
15 // implementation.
16 enum WebSocketError {
17 // Status codes in the range 0 to 999 are not used.
18
19 // The following are defined by RFC6455.
20 kWebSocketNormalClosure = 1000,
21 kWebSocketErrorGoingAway = 1001,
22 kWebSocketErrorProtocolError = 1002,
23 kWebSocketErrorUnsupportedData = 1003,
24 kWebSocketErrorNoStatusReceived = 1005,
25 kWebSocketErrorAbnormalClosure = 1006,
26 kWebSocketErrorInvalidFramePayloadData = 1007,
27 kWebSocketErrorPolicyViolation = 1008,
28 kWebSocketErrorMessageTooBig = 1009,
29 kWebSocketErrorMandatoryExtension = 1010,
30 kWebSocketErrorInternalServerError = 1011,
31 kWebSocketErrorTlsHandshake = 1015,
32
33 // The range 1000-2999 is reserved by RFC6455 for use by the WebSocket
34 // protocol and public extensions.
35 kWebSocketErrorProtocolReservedMax = 2999,
36
37 // The range 3000-3999 is reserved by RFC6455 for registered use by libraries,
38 // frameworks and applications.
39 kWebSocketErrorRegisteredReservedMin = 3000,
40 kWebSocketErrorRegisteredReservedMax = 3999,
41
42 // The range 4000-4999 is reserved by RFC6455 for private use by prior
43 // agreement of the endpoints.
44 kWebSocketErrorPrivateReservedMin = 4000,
45 kWebSocketErrorPrivateReservedMax = 4999,
46 };
47
48 // Convert WebSocketError to net::Error defined in net/base/net_errors.h.
49 NET_EXPORT_PRIVATE Error WebSocketErrorToNetError(WebSocketError error);
50
51 } // namespace net
52
53 #endif // NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_
OLDNEW
« no previous file with comments | « net/websockets/websocket_end_to_end_test.cc ('k') | net/websockets/websocket_errors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698