Your proxy code is totally broken.
First, you only ever accept one connection:
my $client = $sock->accept();
As this is outside of any loop, you'll never even attempt to accept a second or subsequent connection.
And then, you never attempt to read anything from the connecting client:
while(){ while ($client) {
The first line is an endless loop. The second line continues to loop whilst the variable $client has some value; which it always will, which means it is also and endless loop.
In the body of that loop, you are test $_ for the strings ADD and STK, but since you've never read anything from the client, $_ will never get any value, so neither string will be found and no action will ever be taken.
Effectively, your entire program accepts one connection and then loops endlessly doing nothing.
So quite how that "results in a connection refused message" is a mystery seeing as you are never even attempting to connect to the Windows machine?
In reply to Re^2: Bidirectional Client/Server - to fork or not to fork?
by BrowserUk
in thread Bidirectional Client/Server - to fork or not to fork?
by ljamison
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |