def buffer_from_socket_nonblock
      @buffer += @socket.read_nonblock(MSG_BUF_SIZE)
    rescue EOFError
      raise # the caller expects it
    rescue Errno::EAGAIN
      # fine, would block
    rescue Exception => e
      puts "Oops:", e
      raise if @is_tcp # why?
      puts "WARNING: read_nonblock failed, falling back to .recv"
      @buffer += @socket.recv(MSG_BUF_SIZE)
    end
def buffer_from_socket_nonblock
      @buffer += @socket.read_nonblock(MSG_BUF_SIZE)
    rescue EOFError
      raise # the caller expects it
    rescue Errno::EAGAIN
      # fine, would block
    rescue Exception => e
      puts "Oops:", e
      raise if @is_tcp # why?
      puts "WARNING: read_nonblock failed, falling back to .recv"
      @buffer += @socket.recv(MSG_BUF_SIZE)
    end
Fill (append) the buffer from data that might be available on the
 socket.
 EOFError may be raised