Created
September 24, 2010 16:21
-
-
Save BenHall/595627 to your computer and use it in GitHub Desktop.
This file contains 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
require 'socket' | |
socket = TCPSocket.new('localhost', 7894) | |
socket.puts "'B'*50024" | |
all_data = [] | |
while partial_data = socket.read(2024) | |
puts partial_data | |
puts "-------------------------" | |
all_data << partial_data | |
end | |
socket.close | |
puts all_data.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment