Plack-Middleware-WebSocket
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:WebSocket handshake helper middleware
=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 Emotemen@gmail.comE

=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.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。