MCPcopy Index your code
hub / github.com/RustPython/RustPython / recv

Method recv

Lib/test/support/asyncore.py:385–401  ·  view source on GitHub ↗
(self, buffer_size)

Source from the content-addressed store, hash-verified

383 raise
384
385 def recv(self, buffer_size):
386 try:
387 data = self.socket.recv(buffer_size)
388 if not data:
389 # a closed connection is indicated by signaling
390 # a read condition, and having recv() return 0.
391 self.handle_close()
392 return b''
393 else:
394 return data
395 except OSError as why:
396 # winsock sometimes raises ENOTCONN
397 if why.errno in _DISCONNECTED:
398 self.handle_close()
399 return b''
400 else:
401 raise
402
403 def close(self):
404 self.connected = False

Callers 9

serverMethod · 0.45
clientMethod · 0.45
doMethod · 0.45
recv_allMethod · 0.45
readerMethod · 0.45
test_writer_callbackMethod · 0.45
clientMethod · 0.45
recv_allMethod · 0.45
handle_readMethod · 0.45

Calls 1

handle_closeMethod · 0.95

Tested by 7

serverMethod · 0.36
clientMethod · 0.36
doMethod · 0.36
recv_allMethod · 0.36
readerMethod · 0.36
test_writer_callbackMethod · 0.36
clientMethod · 0.36