IO::Socket::Forwarder - bidirectionally forward data between two sockets
use IO::Socket::Forwarder qw(foward_sockets); forward_sockets($sock1, $sock2); forward_sockets($sock3, $sock4, debug => 1);
This module allows to forward data between two sockets bidirectionally.
IO::Socket::SSL sockets are also supported.
Reads and writes data from both sockets simultaneously forwarding it.
On return both sockets will be closed.
This function automatically detects if any of the sockets is of type IO::Socket::SSL and doesn't require any extra configuration to handle them.
The following options are accepted:
turn on debugging. I
maximun number of bytes allowed in IO operations
size of the buffers used internally to transfer data between both sockets
these options allow to preload some data into the buffers used for transferring data between the two sockets.
The samples directory contains a couple of scripts showing how to use this module.
Please report any bugs or feature requests through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IO-Socket-Forwarder or just send my an email with the details.
Salvador Fandiño (email@example.com).
Copyright 2009-2010 by Qindel Formacion y Servicios S.L.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.