Multithreaded send/receive from standard input