OLD | NEW |
(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 // Error values for WebSocket framing. |
| 13 // This values are compatible to RFC6455 defined status codes. |
| 14 enum WebSocketError { |
| 15 WEB_SOCKET_OK = 1000, |
| 16 WEB_SOCKET_ERR_PROTOCOL_ERROR = 1002, |
| 17 WEB_SOCKET_ERR_MESSAGE_TOO_BIG = 1009 |
| 18 }; |
| 19 |
| 20 // Convert WebSocketError to net::Error defined in net/base/net_errors.h. |
| 21 Error WebSocketErrorToNetError(WebSocketError error); |
| 22 |
| 23 } // namespace net |
| 24 |
| 25 #endif // NET_WEBSOCKETS_WEBSOCKET_FRAME_H_ |
OLD | NEW |