in reply to Re: Socket client thread design problem
in thread Socket client thread design problem

Thanks for the hint. The example shows how to share sockets between threads based on their fileno. I figured this out already and got the Perl code working on Linux with this.

But on Windows I still ran into problems with this socket sharing and threads due to the problem of threads->create() blocking if a socket is on a locked state. I tried to workaround this and reached like the third layer of workaround code and it's getting worse each layer. That's why I've asked for general design advise.

  • Comment on Re^2: Socket client thread design problem

Replies are listed 'Best First'.
Re^3: Socket client thread design problem
by zentara (Cardinal) on Mar 21, 2014 at 22:01 UTC

      This just seems to switch the socket between blocking and non-blocking mode. This can also be done with the Blocking parameter of the IO::Socket::INET. This blocking is not the problem. I actually want my socket blocking like this.