Protocol::WebSocket::URL - WebSocket URL
# Construct my $url = Protocol::WebSocket::URL->new; $url->host('example.com'); $url->port('3000'); $url->secure(1); $url->to_string; # wss://example.com:3000 # Parse my $url = Protocol::WebSocket::URL->new->parse('wss://example.com:3000'); $url->host; # example.com $url->port; # 3000 $url->secure; # 1
Construct or parse a WebSocket URL.
host
port
resource_name
secure
new
Create a new Protocol::WebSocket::URL instance.
parse
Parse a WebSocket URL.
to_string
Construct a WebSocket URL.
To install Protocol::WebSocket, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Protocol::WebSocket
CPAN shell
perl -MCPAN -e shell install Protocol::WebSocket
For more information on module installation, please visit the detailed CPAN module installation guide.