What kind of port are you talking about? I was recently in Portugal, in the city of Porto and at the river (near the port), they served interesting wine, called portwine.

But even if we restrict the discussion of ports to a computer, there are at least three ports commonly used that spring to mind:

If you are talking hardware, I would suggest a hardware solution. Either plug in the test system into a different port of the computer, or splice the cable to connect to two machines.

If you are talking software, there are various ways of doing what you're interested in, at least if I understand what you are actually interested in.

I interpret your statements in the software sense as having some software that expects to talk TCP/IP on a fixed port number. You want to make two (or more) instances of that software coexist on the same machine, preferrably on the same network adapter.

If you cannot change the port number (the easiest way), you can maybe use your operating systems facilities. The *BSD family of operating systems has convenient port redirection facilities (even available as Perl module). If you cannot do this redirection (transparently) within your OS, you might want to look if you can run your local program via inetd which can launch a new process for every incoming connection.

If that solution does not seem what you want, maybe you can specify what you want more clearly in terms of a comparison to POE, or Apache, or HTTP::Proxy, or even netcat.

Thanks to calin for spotting various typos.


In reply to Re: Port duplicator by Corion
in thread Port duplicator by tweetiepooh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.