Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/motemen/plack-middleware-websocket
WebSocket handshake helper middleware
https://github.com/motemen/plack-middleware-websocket
Last synced: 3 months ago
JSON representation
WebSocket handshake helper middleware
- Host: GitHub
- URL: https://github.com/motemen/plack-middleware-websocket
- Owner: motemen
- Created: 2010-10-19T15:42:33.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2016-03-04T04:35:56.000Z (almost 9 years ago)
- Last Synced: 2024-05-01T23:31:26.701Z (8 months ago)
- Language: Perl
- Homepage:
- Size: 7.81 KB
- Stars: 26
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
- Changelog: Changes
Awesome Lists containing this project
README
=head1 OBSOLETE - Not up to date with the latest protocol
Maybe you're searching for: L
=head1 NAME
Plack::Middleware::WebSocket - Support WebSocket implementation
=head1 SYNOPSIS
builder {
enable 'WebSocket';
sub {
my $env = shift;
...
if (my $fh = $env->{'websocket.impl'}->handshake) {
# interact via $fh
...
} else {
$res->code($env->{'websocket.impl'}->error_code);
}
};
};=head1 DESCRIPTION
Plack::Middleware::WebSocket provides WebSocket implementation through $env->{'websocket.impl'}.
Currently implements draft-ietf-hybi-thewebsocketprotocol-00 .=head1 METHODS
=over 4
=item my $fh = $env->{'websocket.impl'}->handshake;
Starts WebSocket handshake and returns filehandle on successful handshake.
If failed, $env->{'websocket.impl'}->error_code is set to an HTTP code.=back
=head1 AUTHOR
motemen [email protected]
=head1 SEE ALSO
=head1 LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.