'Attempt to complete the current read operation from buffered data.
If the read can be completed without blocking, schedules the
read callback on the next IOLoop iteration; otherwise starts
listening for reads on the socket.'

def _try_inline_read(self):

    self._run_streaming_callback()
    pos = self._find_read_pos()
    if (pos is not None):
        self._read_from_buffer(pos)
        return
    self._check_closed()
    try:
        pos = self._read_to_buffer_loop()
    except Exception:
        self._maybe_run_close_callback()
        raise
    if (pos is not None):
        self._read_from_buffer(pos)
        return
    if self.closed():
        self._maybe_run_close_callback()
    else:
        self._add_io_state(ioloop.IOLoop.READ)
