in reply to Re^2: Bidirectional Client/Server - to fork or not to fork?
in thread Bidirectional Client/Server - to fork or not to fork?

BrowserUk, thank you for jump starting my critical thinking! I see what I did wrong now thanks to you!

When you pointed out about how I accept only one connection into an endless loop it made me realize what I did wrong so I changed the following and, from what I can tell so far, it appears to be working so thank you for your criticisms!!!!

# I ended up changing this my $client = $sock->accept(); # and this while() { while ($client) { . . . } # to this my $client; # and this while() { while ($client = $sock->accept) { . . . }
and now it works for every request I tried so far! Thank you BrowserUk!

Replies are listed 'Best First'.
Re^4: Bidirectional Client/Server - to fork or not to fork?
by BrowserUk (Patriarch) on Dec 08, 2015 at 15:52 UTC

    That still means that you aren't reading anything from the connecting client.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.