Implemented close code 1014
Also adds two missing messages to get_string()
This commit is contained in:
1 parent
322e3bafbf
commit
f94b3c0e4c
2 files changed
+12
-2
No files matched your search
@@ -39,7 +39,6 @@ using namespace websocketpp;
|
||||
BOOST_AUTO_TEST_CASE( reserved_values ) {
|
||||
BOOST_CHECK( !close::status::reserved(999) );
|
||||
BOOST_CHECK( close::status::reserved(1004) );
|
||||
BOOST_CHECK( close::status::reserved(1014) );
|
||||
BOOST_CHECK( close::status::reserved(1016) );
|
||||
BOOST_CHECK( close::status::reserved(2999) );
|
||||
BOOST_CHECK( !close::status::reserved(1000) );
|
||||
|
||||
+12
-1
@@ -142,6 +142,11 @@ namespace status {
|
||||
/// or reconnect to the same IP upon user action.
|
||||
static value const try_again_later = 1013;
|
||||
|
||||
/// Indicates that the server was acting as a gateway or proxy and received
|
||||
/// an invalid response from the upstream server. This is similar to 502
|
||||
/// HTTP Status Code.
|
||||
static value const bad_gateway = 1014;
|
||||
|
||||
/// An endpoint failed to perform a TLS handshake
|
||||
/**
|
||||
* Designated for use in applications expecting a status code to indicate
|
||||
@@ -178,7 +183,7 @@ namespace status {
|
||||
*/
|
||||
inline bool reserved(value code) {
|
||||
return ((code >= rsv_start && code <= rsv_end) ||
|
||||
code == 1004 || code == 1014);
|
||||
code == 1004);
|
||||
}
|
||||
|
||||
/// First value in range that is always invalid on the wire
|
||||
@@ -248,6 +253,12 @@ namespace status {
|
||||
return "Extension required";
|
||||
case internal_endpoint_error:
|
||||
return "Internal endpoint error";
|
||||
case service_restart:
|
||||
return "Service restart";
|
||||
case try_again_later:
|
||||
return "Try again laster";
|
||||
case bad_gateway:
|
||||
return "Bad gateway";
|
||||
case tls_handshake:
|
||||
return "TLS handshake failure";
|
||||
case subprotocol_error:
|
||||
|
||||
Reference in new issue
Block a user