Skip to content

Instantly share code, notes, and snippets.

@pachun
Created April 22, 2013 20:47
Show Gist options
  • Select an option

  • Save pachun/5438398 to your computer and use it in GitHub Desktop.

Select an option

Save pachun/5438398 to your computer and use it in GitHub Desktop.
require 'socket'
socket = TCPSocket.open('localhost', 6969)
socket.puts('CHAT')
msg = socket.gets
puts "sent:CHAT received:#{msg}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment