in reply to Re^4: Async socket connection
in thread Async socket connection

I'm not sure I could do better than the documentation that I already linked.

See the EXAMPLE section in IO::Select and AnyEvent::Socket.

Maybe you can ask questions by showing actual code you have which tries to use IO::Select or AnyEvent::Socket or threads and tell us how it fails for you to do what you want.