Skip to content

Instantly share code, notes, and snippets.

@lajunta
Created March 31, 2016 06:27
Show Gist options
  • Save lajunta/e82270e90254f558750fdd80a89a7274 to your computer and use it in GitHub Desktop.
Save lajunta/e82270e90254f558750fdd80a89a7274 to your computer and use it in GitHub Desktop.
get lost host ruby client
#!/usr/bin/env ruby
require 'socket'
room = ARGV[0]
hostname = 'localhost'
port = 2000
TCPSocket.open(hostname,port) {|server|
server.puts room
result = server.gets
puts result
server.close
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment