Testing sockets with multiple threads