DOKK / manpages / debian 12 / libprotocol-websocket-perl / Protocol::WebSocket::URL.3pm.en
Protocol::WebSocket::URL(3pm) User Contributed Perl Documentation Protocol::WebSocket::URL(3pm)

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.

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

Parse a WebSocket URL.

Construct a WebSocket URL.

2022-07-04 perl v5.34.0