---
name: "Protocol::WebSocket::URL"
section: "3pm"
platform: "linux"
package: "libprotocol-websocket-perl"
version: "0.26-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Protocol::WebSocket::URL"
---

# Protocol::WebSocket::URL(3pm)

WebSocket URL

## 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
```

## DESCRIPTION

Construct or parse a WebSocket URL.

## ATTRIBUTES

### "host"

### "port"

### "resource\_name"

### "secure"

## METHODS

### "new"

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

### "parse"

Parse a WebSocket URL.

### "to\_string"

Construct a WebSocket URL.
