Commit 33fed428 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Refactored class names

parent fb248930
......@@ -28,7 +28,7 @@
# and from HTTPD filters, they should submit their request as a patch.
##
package POE::Filter::HybridHTTP;
package opentrafficshaper::POE::Filter::HybridHTTP;
use warnings;
use strict;
......@@ -36,7 +36,7 @@ use strict;
use bytes;
use POE::Filter;
use POE::Filter::HybridHTTP::WebSocketFrame;
use opentrafficshaper::POE::Filter::HybridHTTP::WebSocketFrame;
use vars qw($VERSION @ISA);
# NOTE - Should be #.### (three decimal places)
......@@ -160,7 +160,7 @@ sub put
foreach my $response (@{$responses}) {
# If we don't have a websocket state, create one
if (!$self->{'websocket_state'}) {
$self->{'websocket_state'} = new POE::Filter::HybridHTTP::WebSocketFrame();
$self->{'websocket_state'} = new opentrafficshaper::POE::Filter::HybridHTTP::WebSocketFrame();
}
# Don't mask replies from server to client RFC6455 secion 5.1.
$self->{'websocket_state'}->masked(0);
......@@ -404,7 +404,7 @@ sub _get_one_websocket_record
# If we don't have a websocket state, create one
if (!$self->{'websocket_state'}) {
$self->{'websocket_state'} = new POE::Filter::HybridHTTP::WebSocketFrame();
$self->{'websocket_state'} = new opentrafficshaper::POE::Filter::HybridHTTP::WebSocketFrame();
}
$self->{'websocket_state'}->append($self->{'buffer'});
# Blank our buffer
......
......@@ -33,7 +33,7 @@
# the same terms as Perl 5.10.
##
package POE::Filter::HybridHTTP::WebSocketFrame;
package opentrafficshaper::POE::Filter::HybridHTTP::WebSocketFrame;
use bytes;
......
......@@ -30,7 +30,7 @@
# and from HTTPD filters, they should submit their request as a patch.
##
package POE::Filter::TCStatistics;
package opentrafficshaper::POE::Filter::TCStatistics;
use warnings;
use strict;
......
......@@ -28,12 +28,12 @@ use HTTP::Response;
use HTTP::Status qw( :constants :is );
use JSON;
use POE qw( Component::Server::TCP );
use POE::Filter::HybridHTTP;
use URI;
use opentrafficshaper::logger;
use opentrafficshaper::plugins;
use opentrafficshaper::POE::Filter::HybridHTTP;
# Pages (this is used a little below)
use opentrafficshaper::plugins::webserver::pages::static;
......@@ -159,7 +159,7 @@ sub plugin_init
ClientConnected => \&server_client_connected,
ClientDisconnected => \&server_client_disconnected,
# Filter to handle HTTP
ClientFilter => 'POE::Filter::HybridHTTP',
ClientFilter => 'opentrafficshaper::POE::Filter::HybridHTTP',
# Function to handle HTTP requests (as we passing through a filter)
ClientInput => \&server_request,
# Setup the sever
......
......@@ -20,8 +20,13 @@ use warnings;
# Set the dirs we look for library files in
use lib('/usr/local/lib/opentrafficshaper-1.0','/usr/lib/opentrafficshaper-1.0',
'/usr/lib64/opentrafficshaper-1.0','opentrafficshaper','awitpt','lib');
use lib(
'/usr/local/lib/opentrafficshaper-1.0',
'/usr/lib/opentrafficshaper-1.0',
'/usr/lib64/opentrafficshaper-1.0',
'opentrafficshaper',
'awitpt/lib',
);
# Enable assertions
BEGIN {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment