Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: How to pass client connections to the worker threads?by betterworld (Curate) |
on Sep 10, 2008 at 12:30 UTC ( [id://710346]=note: print w/replies, xml ) | Need Help?? |
The problem here is that CLIENTSOCKET is not autoflushing. You should add a line like CLIENTSOCKET->autoflush(1); somewhere between the open and the print. Note that for the other sockets this is not necessary because IO::Socket sets its sockets to autoflush automatically. By the way, you don't need to store the socket in your filesystem (in /tmp/undomain). Instead, you can call socketpair before you create the thread.
In Section
Seekers of Perl Wisdom
|
|