blob: 35d2462cea23aa27c20b0b22f06846b29ab2a5b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_
#define NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_
#include "net/base/net_errors.h"
namespace net {
// Error values for WebSocket framing.
// This values are compatible to RFC6455 defined status codes.
enum WebSocketError {
WEB_SOCKET_OK = 1000,
WEB_SOCKET_ERR_PROTOCOL_ERROR = 1002,
WEB_SOCKET_ERR_MESSAGE_TOO_BIG = 1009
};
// Convert WebSocketError to net::Error defined in net/base/net_errors.h.
NET_EXPORT_PRIVATE Error WebSocketErrorToNetError(WebSocketError error);
} // namespace net
#endif // NET_WEBSOCKETS_WEBSOCKET_FRAME_H_
|