Created
April 23, 2017 18:13
-
-
Save bararchy/6f50dacbfe74fc4e452c1bbec4b9d6d0 to your computer and use it in GitHub Desktop.
slecet
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
def buffer_from_socket | |
buff = "" # buffer is empty | |
while IO.select([socket], nil,nil,5) | |
read_and_add_to_buff | |
end | |
return buff | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment