NAME
Protocol::WebSocket::Fast::Error - Websocket error constants
SYNOPSIS
use Protocol::WebSocket::Fast;
my @msgs = $server->get_messages($buf);
...
if ($msg->error == Protocol::WebSocket::Fast::Error::max_message_size) {
...
}
DESCRIPTION
Constants provided by this package are returned by parsers to signal about websocket protocol errors.
All errors are XS::ErrorCode objects and are of category Protocol::WebSocket::Fast::error_category
.
Protocol::WebSocket::Fast::Error::max_frame_size->category() == Protocol::WebSocket::Fast::error_category; # true
CONSTANTS
- garbage_after_connect
-
Client sent something immediately after http connection request
- unsupported_version
-
Client wants version that server does not support
- response_code_101
-
The client-side expected 101/Protocol switch from the server response to switch from HTTP to websockets protocol, but other code has been received.
- connection_mustbe_upgrade
-
HTTP header
Connection
is not set toupgrade
- upgrade_mustbe_websocket
-
HTTP header
Upgrade
is not set towebsocket
- sec_accept_missing
-
HTTP header
Sec-WebSocket-Accept
is missing or contains invalid value - method_mustbe_get
-
Client's HTTP connection request method is not
GET
- http_1_1_required
-
HTTP request/response version is not
1.1
- body_prohibited
-
Client's HTTP connection request has HTTP body
- invalid_opcode
-
Frame with invalid or reserved opcode
- control_fragmented
-
Fragmented
control frame
received. - control_payload_too_big
-
Maximum payload for control frame exceeded (127 bytes)
- not_masked
-
Unmasked frame from client
- max_frame_size
-
frame
size exceeds max configured size. - max_message_size
-
message
size exceeds max configured size. - close_frame_invalid_data
-
Bad payload for close frame (bad close code, unparsable close code, etc...)
- initial_continue
-
The initial frame cannot have opcode
CONTINUE
- fragment_no_continue
-
Fragmented websocket frame should have opcode
CONTINUE
- deflate_negotiation_failed
-
Client received unsupported per-message deflate extension settings from server
- control_frame_compression
-
Received control frame was compressed, but
permessage-deflate
websocket extension cannot be applied for control frames - inflate_error
-
Internal error in
zlib
library, compressed payload is corrupted - unexpected_rsv
-
Received a frame with one of RSV flags set but no extension defining RSV meaning has been negotiated
- invalid_utf8
-
Invalid utf8 sequence in text payload