Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    POE::Component::Proxy::TCP 1.2

    Download button

    No screenshots available
    Downloads: 324  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andrew V. Purshottam | More programs
    Perl Artistic License / FREE
    April 11th, 2007, 01:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    POE::Component::Proxy::TCP description

    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
    [do the per connection ones]
    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;


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    TCP proxy | POE component | Perl module | module | POE | component

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM