MCPcopy
hub / github.com/aio-libs/aiohttp / read

Method read

aiohttp/streams.py:438–459  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

436
437 @asyncio.coroutine
438 def read(self):
439 if not self._buffer and not self._eof:
440 if self._exception is not None:
441 raise self._exception
442
443 assert not self._waiter
444 self._waiter = asyncio.Future(loop=self._loop)
445 try:
446 yield from self._waiter
447 except (asyncio.CancelledError, asyncio.TimeoutError):
448 self._waiter = None
449 raise
450
451 if self._buffer:
452 data, size = self._buffer.popleft()
453 self._size -= size
454 return data
455 else:
456 if self._exception is not None:
457 raise self._exception
458 else:
459 raise EofStream
460
461 if PY_35:
462 @asyncio.coroutine

Callers 15

setup.pyFile · 0.45
readFunction · 0.45
handle_requestMethod · 0.45
__next__Method · 0.45
closeMethod · 0.45
receiveMethod · 0.45
startMethod · 0.45
handle_requestMethod · 0.45
iter_chunkedMethod · 0.45
readMethod · 0.45
readMethod · 0.45
readMethod · 0.45

Calls

no outgoing calls

Tested by 1

handle_requestMethod · 0.36