GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PROTOCOL::WEBSOCKET::HANDSHAKE::SERVER (3)

.ds Aq ’

NAME

Protocol::WebSocket::Handshake::Server - WebSocket Server Handshake

CONTENTS

SYNOPSIS



    my $h = Protocol::WebSocket::Handshake::Server->new;

    # Parse client request
    $h->parse(<<"EOF");
        WebSocket HTTP message
    EOF

    $h->error;   # Check if there were any errors
    $h->is_done; # Returns 1

    # Create response
    $h->to_string;



DESCRIPTION

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

METHODS

CWnew

Create a new Protocol::WebSocket::Handshake::Server instance.

CWnew_from_psgi



    my $env = {
        HTTP_HOST => example.com,
        HTTP_CONNECTION => Upgrade,
        ...
    };
    my $handshake = Protocol::WebSocket::Handshake::Server->new_from_psgi($env);



Create a new Protocol::WebSocket::Handshake::Server instance from PSGI environment.

CWparse



    $handshake->parse($buffer);
    $handshake->parse($handle);



Parse a WebSocket client request. Returns undef and sets error attribute on error.

When buffer is passed it’s modified (unless readonly).

CWto_string

Construct a WebSocket server response.

CWis_done

Check whether handshake is done.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PROTOCOL::WEBSOCKET::HANDSHAKE::SERVER (3) 2011-10-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.