method

readuntil

Importance_0
readuntil(terminator, ignore_eof = false) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/net/protocol.rb, line 114
    def readuntil(terminator, ignore_eof = false)
      begin
        until idx = @rbuf.index(terminator)
          rbuf_fill
        end
        return rbuf_consume(idx + terminator.size)
      rescue EOFError
        raise unless ignore_eof
        return rbuf_consume(@rbuf.size)
      end
    end
Register or log in to add new notes.