-
-
09 Mar 2019 09:35:58 UTC
- Distribution: Protocol-WebSocket
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (22)
- Testers (4021 / 0 / 0)
- Kwalitee
Bus factor: 1- 91.70% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (36.61KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 16 contributors-
Anton Petrusevich
-
BlueT - Matthew Lien - 練喆明
-
Chia-liang Kao
-
Daniel Kamil Kozar
-
Eric Wastl
-
Graham Ollis
-
Joao Orui
-
Jon Gentle
-
Jonathan Barber
-
Lee Aylward
-
Max Maischein
-
Michal Špaček
-
Neil Bowers
-
Paul "LeoNerd" Evans
-
Toshio Ito
-
vti
NAME
Protocol::WebSocket::Handshake::Client - WebSocket Client Handshake
SYNOPSIS
my $h = Protocol::WebSocket::Handshake::Client->new(url => 'ws://example.com'); # Create request $h->to_string; # Parse server response $h->parse(<<"EOF"); WebSocket HTTP message EOF $h->error; # Check if there were any errors $h->is_done; # Returns 1
DESCRIPTION
Construct or parse a client WebSocket handshake. This module is written for convenience, since using request and response directly requires the same code again and again.
ATTRIBUTES
url
$handshake->url('ws://example.com/demo');
Set or get WebSocket url.
METHODS
new
Create a new Protocol::WebSocket::Handshake::Client instance.
parse
$handshake->parse($buffer);
Parse a WebSocket server response. Returns
undef
and setserror
attribute on error. Buffer is modified.to_string
Construct a WebSocket client request.
is_done
Check whether handshake is done.
Module Install Instructions
To install Protocol::WebSocket, copy and paste the appropriate command in to your terminal.
cpanm Protocol::WebSocket
perl -MCPAN -e shell install Protocol::WebSocket
For more information on module installation, please visit the detailed CPAN module installation guide.