Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

steph (4655)

  (email not shown publicly)

I am a Un*x, C, Perl, ksh, elisp hacker living in Madrid. I enjoy all kinds of Mathematics and the study of computer languages. Perl is my favourite language (often for the wrong reasons). I am sgt on Perl Monks; my skypeid is stephangt4.

Journal of steph (4655)

Thursday December 08, 2005
09:46 AM

a generic proxy (or port forwarder)

[ #27894 ]

On my local net, only a couple machines are "visible" from another coupled intranet, which means
that a client PC is subject to arbitrary connection
severing after a relatively short time...sic

it is clear that I need a port forwarder, and I need it fast (as usual)...this means perl and first CPAN to make sure I don't reinvent the obvious.

So I came across the Net::Server framework which has a multiplexer incarnation that seems promising; on the client side it is normally VERY protocol-oriented so as a basis I will use some code from Lincoln Stein's network book.

ok network code is only half the story, as I soon discover, the true question is when do I close a client connection? there are some obvious cases,
server closes its read end (or both) client says it's done; but what about mis-behaving or real slow clients etc....Humm need more thinking

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • If you need it fast, don't build it. Hop on over to [] and download one. I like aproxy [] but lots are available.


    • thanks Sam. I tried aproxy and it's quite OK... actually I missed the issue completely with FTP which **does use two ports** apart from that I'll try to make an option to go non-blocking (especially the "forward" sub, maybe using something like Lincoln Stein's IO::SessionData).