logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Protocol::WebSocket::URL - WebSocket URL

Attributes

"host""port""resource_name""secure"

Description

       Construct or parse a WebSocket URL.

Methods

"new"
       Create a new Protocol::WebSocket::URL instance.

   "parse"
       Parse a WebSocket URL.

   "to_string"
       Construct a WebSocket URL.

perl v5.34.0                                       2022-07-04                      Protocol::WebSocket::URL(3pm)

Name

       Protocol::WebSocket::URL - WebSocket URL

Synopsis

           # 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