in reply to Threaded UDP Communication

This is case where apartment threading might be useful...

I'd suggest wrapping your socket I/O logic in its own class - kinda like a protocol stack, but I'll call it an "I/O discipline". You then run the I/O discipline object in its own thread, and the session object in its own thread, and communicate between your session object and your I/O object via a Thread::Queue (or similar facility). (Take a peek at DBIx::Threaded for a similar solution to a more complex I/O discipline)

Note that, while it is possible to pass the socket around in a fileno form, and then fdopen() it in the receiver, I think using the apt. threaded I/O discipline may be preferable, in the event you ever need to add another apartment threaded object to your app.