|Syntactic Confectionery Delight|
IO::Socket connect fails to blockby mr.nick (Chaplain)
|on Jan 06, 2012 at 18:29 UTC||Need Help??|
mr.nick has asked for the
wisdom of the Perl Monks concerning the following question:
I must be missing something very basic here, but I'm having a problem with connecting to a single threaded server based on IO::Socket. Basically, the following does not block until the other side does a "$server->accept".
I had expected that if the server was written as such
Once it had accepted one connection, any subsequent ones would block until it could accept() again.
I am obviously wrong here.
The above is contrived, of course, but what I want is the part that connects to block until the server is finished with it's current request.
As I said, I'm missing something obvious I'm sure, so please help out a brain-addled fellow monk.
Here is the test code I wrote in it's entirety:
Then what I did was this: