POE::Component::Proxy::TCPPOE::Component::Proxy::TCP is a simplified TCP proxy. | |
Download |
POE::Component::Proxy::TCP Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Andrew V. Purshottam
- Publisher web site:
- http://search.cpan.org/~andypur/POE-Component-Proxy-TCP-1.2/lib/POE/Component/Proxy/TCP.pm
POE::Component::Proxy::TCP Tags
POE::Component::Proxy::TCP Description
POE::Component::Proxy::TCP is a simplified TCP proxy. POE::Component::Proxy::TCP is a simplified TCP proxy.SYNOPSIS use POE qw(Component::Proxy::TCP); POE::Component::Proxy::TCP->new (Alias => "ProxyServerSessionAlias", Port => $local_server_port, OrigPort => $remote_server_port, OrigAddress => $remote_server_host, DataFromClient => &data_from_client_handler, DataFromServer => &data_from_server_handler, ); # gets called with data passed from server. # called inside the per client connected session created by PoCo::Server::TCP sub data_from_server_handler { my $server_data = shift; # show obtaining other session info esp per proxy session info }; # gets called with data passed from remote client # sub data_from_client_handler { my $server_data = shift; }; # show obtaining other session info esp per proxy session info # Reserved HEAP variables: $heap->{self} = Proxy object / instance var hash $heap->{self}->losta stuff add documentation EXAMPLE ^ use warnings; use strict; use diagnostics; use POE; use POE::Filter::Stream; use POE::Filter::Line; use POE::Component::Proxy::TCP; $|++; POE::Component::Proxy::TCP->new (Alias => "ProxyServerSessionAlias", Port => 4000, OrigPort => 5000, OrigAddress => "localhost", DataFromClient => sub {print "From client:", shift(), "n";}, DataFromServer => sub {print "From server:", shift(), "n";}, RemoteClientFilter => "POE::Filter::Stream", RemoteServerOutputFilter => "POE::Filter::Stream", RemoteServerInputFilter => "POE::Filter::Stream" ); $poe_kernel->run(); exit 0;Requirements:· Perl Requirements: · Perl
POE::Component::Proxy::TCP Related Software