| 1 | package Net::WebSocket::X::BadRequestProtocol; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use Net::WebSocket::Constants (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | ▶ | use parent qw( Net::WebSocket::X::Base ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | ▶ | sub _new { |
|
Subroutine
_new: called CC=1 SCAR=0.0
| |||
| 11 | 2 | my ($class, $protocol) = @_; | |
| 12 | |||
| 13 | 2 | my $str = "Received invalid HTTP request protocol: $protocol"; | |
| 14 | |||
| 15 | 2 | $str .= " - must be " . Net::WebSocket::Constants::REQUIRED_REQUEST_PROTOCOL(); | |
| 16 | |||
| 17 | 2 | return $class->SUPER::_new( | |
| 18 | $str, | ||
| 19 | protocol => $protocol, | ||
| 20 | ); | ||
| 21 | } | ||
| 22 | |||
| 23 | 2 | 1; | |