WebSocket++  0.8.3-dev
C++ websocket client/server library
Classes | Namespaces | Typedefs | Functions | Variables
close.hpp File Reference
#include <websocketpp/error.hpp>
#include <websocketpp/common/network.hpp>
#include <websocketpp/common/stdint.hpp>
#include <websocketpp/utf8_validator.hpp>
#include <string>

Go to the source code of this file.

Classes

union  websocketpp::close::code_converter
 Type used to convert close statuses between integer and wire representations. More...
 

Namespaces

 websocketpp
 Namespace for the WebSocket++ project.
 
 websocketpp::close
 A package of types and methods for manipulating WebSocket close codes.
 
 websocketpp::close::status
 A package of types and methods for manipulating WebSocket close status'.
 

Typedefs

typedef uint16_t websocketpp::close::status::value
 The type of a close code value.
 

Functions

bool websocketpp::close::status::reserved (value code)
 Test whether a close code is in a reserved range. More...
 
bool websocketpp::close::status::invalid (value code)
 Test whether a close code is invalid on the wire. More...
 
bool websocketpp::close::status::terminal (value code)
 Determine if the code represents an unrecoverable error. More...
 
std::string websocketpp::close::status::get_string (value code)
 Return a human readable interpretation of a WebSocket close code. More...
 
status::value websocketpp::close::extract_code (std::string const &payload, lib::error_code &ec)
 Extract a close code value from a close payload. More...
 
std::string websocketpp::close::extract_reason (std::string const &payload, lib::error_code &ec)
 Extract the reason string from a close payload. More...
 

Variables

static value const websocketpp::close::status::blank = 0
 A blank value for internal use.
 
static value const websocketpp::close::status::omit_handshake = 1
 Close the connection without a WebSocket close handshake. More...
 
static value const websocketpp::close::status::force_tcp_drop = 2
 Close the connection with a forced TCP drop. More...
 
static value const websocketpp::close::status::normal = 1000
 
static value const websocketpp::close::status::going_away = 1001
 
static value const websocketpp::close::status::protocol_error = 1002
 A protocol error occurred.
 
static value const websocketpp::close::status::unsupported_data = 1003
 
static value const websocketpp::close::status::no_status = 1005
 A dummy value to indicate that no status code was received. More...
 
static value const websocketpp::close::status::abnormal_close = 1006
 A dummy value to indicate that the connection was closed abnormally. More...
 
static value const websocketpp::close::status::invalid_payload = 1007
 An endpoint received message data inconsistent with its type. More...
 
static value const websocketpp::close::status::policy_violation = 1008
 An endpoint received a message that violated its policy. More...
 
static value const websocketpp::close::status::message_too_big = 1009
 An endpoint received a message too large to process.
 
static value const websocketpp::close::status::extension_required = 1010
 A client expected the server to accept a required extension request. More...
 
static value const websocketpp::close::status::internal_endpoint_error = 1011
 
static value const websocketpp::close::status::service_restart = 1012
 
static value const websocketpp::close::status::try_again_later = 1013
 
static value const websocketpp::close::status::bad_gateway = 1014
 
static value const websocketpp::close::status::tls_handshake = 1015
 An endpoint failed to perform a TLS handshake. More...
 
static value const websocketpp::close::status::subprotocol_error = 3000
 A generic subprotocol error. More...
 
static value const websocketpp::close::status::invalid_subprotocol_data = 3001
 A invalid subprotocol data. More...
 
static value const websocketpp::close::status::rsv_start = 1016
 First value in range reserved for future protocol use.
 
static value const websocketpp::close::status::rsv_end = 2999
 Last value in range reserved for future protocol use.
 
static value const websocketpp::close::status::invalid_low = 999
 First value in range that is always invalid on the wire.
 
static value const websocketpp::close::status::invalid_high = 5000
 Last value in range that is always invalid on the wire.
 

Detailed Description

A package of types and methods for manipulating WebSocket close codes.

Definition in file close.hpp.