Created
March 31, 2016 06:27
-
-
Save lajunta/e82270e90254f558750fdd80a89a7274 to your computer and use it in GitHub Desktop.
get lost host ruby client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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