Protocol::WebSocket::XS::Error - Websocket error constants
use Protocol::WebSocket::XS; my @msgs = $server->get_messages($buf); ... if ($msg->error == Protocol::WebSocket::XS::Error::max_message_size) { ... }
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::XS::error_category.
Protocol::WebSocket::XS::error_category
Protocol::WebSocket::XS::Error::max_frame_size->category() == Protocol::WebSocket::XS::error_category; # true
Client sent something immediately after http connection request
Client wants version that server does not support
The client-side expected 101/Protocol switch from the server response to switch from HTTP to websockets protocol, but other code has been received.
HTTP header Connection is not set to upgrade
Connection
upgrade
HTTP header Upgrade is not set to websocket
Upgrade
websocket
HTTP header Sec-WebSocket-Accept is missing or contains invalid value
Sec-WebSocket-Accept
Client's HTTP connection request method is not GET
GET
HTTP request/response version is not 1.1
1.1
Client's HTTP connection request has HTTP body
Frame with invalid or reserved opcode
Fragmented control frame received.
control frame
Maximum payload for control frame exceeded (127 bytes)
Unmasked frame from client
frame size exceeds max configured size.
frame
message size exceeds max configured size.
message
Bad payload for close frame
The initial frame cannot have opcode CONTINUE
CONTINUE
Fragmented websocket frame should have opcode CONTINUE
Client received unsupported per-message deflate extension settings from server
Received control frame was compressed, but permessage-deflate websocket extension cannot be applied for control frames
permessage-deflate
Internal error in zlib library, compressed payload is corrupted
zlib
Protocol::WebSocket::XS
To install Protocol::WebSocket::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Protocol::WebSocket::XS
CPAN shell
perl -MCPAN -e shell install Protocol::WebSocket::XS
For more information on module installation, please visit the detailed CPAN module installation guide.