Pass the fileno of the socket to the threads. You can share filehandles in threads, but only thru the fileno. See Simple threaded chat server. If the thread has already been created, put the fileno of the socket, into a shared variable, and instruct the thread to read it and open it.
In reply to Re: How to pass client connections to the worker threads?
by zentara
in thread How to pass client connections to the worker threads?
by sunshine_august
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |