Skip to content

Instantly share code, notes, and snippets.

@ericsaboia
Created July 4, 2011 17:29
Show Gist options
  • Save ericsaboia/1063653 to your computer and use it in GitHub Desktop.
Save ericsaboia/1063653 to your computer and use it in GitHub Desktop.
TCPSocket Client
socket = TCPSocket.new('localhost', 8081)
socket.write(configs)
all_data = []
while true
partial_data = socket.recv(1012)
if partial_data.length == 0
break
end
all_data << partial_data
end
socket.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment