Using TCPSocket
, I need to socket.puts "foobar"
, and then socket.close
to let the socket in the other side socket.read
the message.
Is there a way to send or receive a message though a socket, but without closing the socket, which mean I can send message again without creating a socket again?
p.s Something like websocket