enum Poco::Net::WebSocket::ErrorCodes

Overview

These error codes can be obtained from a WebSocketException to determine the exact cause of the error. Moreā€¦

#include <WebSocket.h>

enum ErrorCodes
{
    WS_ERR_NO_HANDSHAKE                  = 1,
    WS_ERR_HANDSHAKE_NO_VERSION          = 2,
    WS_ERR_HANDSHAKE_UNSUPPORTED_VERSION = 3,
    WS_ERR_HANDSHAKE_NO_KEY              = 4,
    WS_ERR_HANDSHAKE_ACCEPT              = 5,
    WS_ERR_UNAUTHORIZED                  = 6,
    WS_ERR_PAYLOAD_TOO_BIG               = 10,
    WS_ERR_INCOMPLETE_FRAME              = 11,
};

Detailed Documentation

These error codes can be obtained from a WebSocketException to determine the exact cause of the error.

Enum Values

WS_ERR_NO_HANDSHAKE

No Connection: Upgrade or Upgrade: websocket header in handshake request.

WS_ERR_HANDSHAKE_NO_VERSION

No Sec-WebSocket-Version header in handshake request.

WS_ERR_HANDSHAKE_UNSUPPORTED_VERSION

Unsupported WebSocket version requested by client.

WS_ERR_HANDSHAKE_NO_KEY

No Sec-WebSocket-Key header in handshake request.

WS_ERR_HANDSHAKE_ACCEPT

No Sec-WebSocket-Accept header or wrong value.

WS_ERR_UNAUTHORIZED

The server rejected the username or password for authentication.

WS_ERR_PAYLOAD_TOO_BIG

Payload too big for supplied buffer.

WS_ERR_INCOMPLETE_FRAME

Incomplete frame received.