def gets(separator, timeout = @timeout)
      while (crlf = @buffer.index(separator)).nil?
        @buffer << readpartial(1024, timeout)
      end

      @buffer.slice!(0, crlf + separator.bytesize)
    end
def gets(separator, timeout = @timeout)
      while (crlf = @buffer.index(separator)).nil?
        @buffer << readpartial(1024, timeout)
      end

      @buffer.slice!(0, crlf + separator.bytesize)
    end
Read until separator
 @param [String] separator separator
 @return [String] read result