Net::Libwebsockets::X::WebSocketClose - Non-success WebSocket close
if ($err->get('code') == 4000) { # .. whatever special handling your application may define # for close code 4000 .. } else { die $err; }
This class represents a WebSocket close whose code is not a recognized success state: 1000, or empty.
Note that high-range close codes (e.g., 4xxx) also trigger this, so if your application is going to be sending those, be sure to catch this error and handle it accordingly.
code
reason (decoded text!)
reason
To install Net::Libwebsockets, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Libwebsockets
CPAN shell
perl -MCPAN -e shell install Net::Libwebsockets
For more information on module installation, please visit the detailed CPAN module installation guide.