1Protocol::WebSocket::HaUnsdesrhaCkoen:t:rCilbiuetPnertdo(t3Popecmro)ll:D:oWceubmSeonctkaetti:o:nHandshake::Client(3pm)
2
3
4

NAME

6       Protocol::WebSocket::Handshake::Client - WebSocket Client Handshake
7

SYNOPSIS

9           my $h =
10             Protocol::WebSocket::Handshake::Client->new(url => 'ws://example.com');
11
12           # Create request
13           $h->to_string;
14
15           # Parse server response
16           $h->parse(<<"EOF");
17               WebSocket HTTP message
18           EOF
19
20           $h->error;   # Check if there were any errors
21           $h->is_done; # Returns 1
22

DESCRIPTION

24       Construct or parse a client WebSocket handshake. This module is written
25       for convenience, since using request and response directly requires the
26       same code again and again.
27

ATTRIBUTES

29   "url"
30           $handshake->url('ws://example.com/demo');
31
32       Set or get WebSocket url.
33

METHODS

35   "new"
36       Create a new Protocol::WebSocket::Handshake::Client instance.
37
38   "parse"
39           $handshake->parse($buffer);
40
41       Parse a WebSocket server response. Returns "undef" and sets "error"
42       attribute on error. Buffer is modified.
43
44   "to_string"
45       Construct a WebSocket client request.
46
47   "is_done"
48       Check whether handshake is done.
49
50
51
52perl v5.30.0                      20P1r9o-t0o7c-o2l6::WebSocket::Handshake::Client(3pm)
Impressum