1Protocol::WebSocket::URULs(e3rpmC)ontributed Perl DocumePnrtoattoicoonl::WebSocket::URL(3pm)
2
3
4
6 Protocol::WebSocket::URL - WebSocket URL
7
9 # Construct
10 my $url = Protocol::WebSocket::URL->new;
11 $url->host('example.com');
12 $url->port('3000');
13 $url->secure(1);
14 $url->to_string; # wss://example.com:3000
15
16 # Parse
17 my $url = Protocol::WebSocket::URL->new->parse('wss://example.com:3000');
18 $url->host; # example.com
19 $url->port; # 3000
20 $url->secure; # 1
21
23 Construct or parse a WebSocket URL.
24
26 "host"
27 "port"
28 "resource_name"
29 "secure"
31 "new"
32 Create a new Protocol::WebSocket::URL instance.
33
34 "parse"
35 Parse a WebSocket URL.
36
37 "to_string"
38 Construct a WebSocket URL.
39
40
41
42perl v5.34.0 2021-07-22 Protocol::WebSocket::URL(3pm)