title: Send and receive TCP data in ruby
body: <p>I have a TCP server running which accepts the command "GETHELLO" and return "HELLO".
  I test it by using Telnet in linux shell :</p>
  
  <pre><code>:~$ telnet 192.168.1.10 3000
  Trying 192.168.1.10...
  Connected to 192.168.1.10.
  Escape character is '^]'.
  GETHELLO
  HELLO
  </code></pre>
  
  <p>How can I do this in ruby using TCPSocket ? (send "GETHELLO" and read the data "HELLO" returned by the server)</p>
  
  <p>Thanks!</p>