threads won't allow you to share blessed objects directly, and IO::Socket handles are blessed globs. The only workaround that I've discovered so far is to share the fileno of sockets that you wish to use from multiple threads (which Perl sees as simple scalars), and then use this to dup the socket into other threads that need to access the socket.
See Re: FileHandles and threads & Re: multithreaded tcp listener with IO::Socket and associated subthreads for some background and detail.
In reply to Re: Threaded Sockets, access from outside thread?
by BrowserUk
in thread Threaded Sockets, access from outside thread?
by ecuguru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |