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

Method wait

aiohttp/parsers.py:419–430  ·  view source on GitHub ↗

wait() waits for specified amount of bytes then returns data without changing internal buffer.

(self, size)

Source from the content-addressed store, hash-verified

417 self._writer.send((yield))
418
419 def wait(self, size):
420 """wait() waits for specified amount of bytes
421 then returns data without changing internal buffer."""
422
423 while True:
424 if self._helper.exception:
425 raise self._helper.exception
426
427 if len(self._data) >= size:
428 return self._data[:size]
429
430 self._writer.send((yield))
431
432 def waituntil(self, stop, limit=None):
433 """waituntil() reads until `stop` bytes sequence."""

Callers 11

run_aiohttpFunction · 0.80
run_tornadoFunction · 0.80
run_twistedFunction · 0.80
runFunction · 0.80
closeMethod · 0.80
fMethod · 0.80
test_exception_waiterMethod · 0.80
test_exception_waiterMethod · 0.80
test_waitFunction · 0.80
test_wait_excFunction · 0.80
test_handle_cancelFunction · 0.80

Calls 1

sendMethod · 0.45

Tested by 6

fMethod · 0.64
test_exception_waiterMethod · 0.64
test_exception_waiterMethod · 0.64
test_waitFunction · 0.64
test_wait_excFunction · 0.64
test_handle_cancelFunction · 0.64