in reply to IO::Socket::INET in worker threads
Or you could spawn 2 threads, one for sending or for receiving. This is what is commonly done in socket clients, they are forked( or threaded) to make them receive/send at the same time....i.e. bidirectional. See Simple bi-directional forking commandline client
Without the bidirectional forking/threading/select code in your socket code, you will need to setup a protocol to tell both ends of the connection which mode to be in send() or recv(), and constantly juggle them.
|
|---|