Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm wondering if there's a way I can use a wrapper using Perl on Win32 that will redirect a new socket over an existing one. The app would go something like this:

- client initiates outbound connection to server, sends data

- client launches other stand-alone programs which want to create new socket

- new programs get redirected through existing connection

Thanks for your suggestions.

Glenn

Replies are listed 'Best First'.
Re: wrapper to redirect new tcp connection
by suaveant (Parson) on Aug 09, 2001 at 21:05 UTC
    I suppose a good way to do this would be to start a separate program to handle talking over the socket, start it when the first instance of the program runs, accept other connections and use select to see which ones have info to send, and close this program when all of it's connections are gone...
    Of course, you could also just rewrite the server to accept multiple connections... (if the server is yours to rewrite)

                    - Ant
                    - Some of my best work - Fish Dinner