PyDocs

Nav

Networking and Interprocess Communication

socket.recv

socket

method of socketnot WASI
  • socket.recv(bufsize[, flags])
recv(buffersize[, flags]) -> data

Receive up to buffersize bytes from the socket.  For the optional flags
argument, see the Unix manual.  When no data is available, block until
at least one byte is available or until the remote end is closed.  When
the remote end is closed and all data is read, return the empty string.
Changed in 3.5
  • 3.5: If the system call is interrupted and the signal handler does not raise an exception, the method now retries the system call instead of raising an InterruptedError exception (see PEP 475 for the rationale).
0 Examples
No examples for socket/socket.recv.
See Also
No see-alsos for socket/socket.recv
0 Notes
No notes for socket.recv