1 | #! perl # mandatory depends=tcp |
1 | #! perl # mandatory depends=tcp |
2 | |
2 | |
3 | # websocket protocol server, actually only the handshake part |
3 | # websocket protocol server (RFC6455), actually only the handshake part |
|
|
4 | # the framing is implemented in socket/lowlevel.C |
|
|
5 | # this implementations doesn't even try to completely implement th RFC, |
|
|
6 | # it tries only to be good enough. |
4 | |
7 | |
5 | use Digest::SHA1 (); |
8 | use Digest::SHA1 (); |
6 | |
9 | |
7 | # websocket requests can be very long, and we want the tcp code to buffer for us |
10 | # websocket requests can be very long, and we want the tcp code to buffer for us |
8 | our $detector = ext::tcp::register websocket => 4096, sub { |
11 | our $detector = ext::tcp::register websocket => 4096, sub { |