python-network
Python module for easy networking
Loading...
Searching...
No Matches

◆ recv()

network.Socket.recv ( self,
maxsize = 4096 )

Read data from the network.

Data is read from the network. If the socket is not set to non-blocking, this call will block if there is no data. It will return a short read if limited data is available. The read data is returned as a bytes object. If TLS is enabled, more than maxsize bytes may be returned. On EOF, the socket is closed and if disconnect_cb is not set, an EOFError is raised.

Parameters
maxsizepassed to the underlaying recv call. If TLS is enabled, no data is left pending, which means that more than maxsize bytes can be returned.
Returns
The received data as a bytes object.

Definition at line 346 of file network.py.

Here is the call graph for this function:
Here is the caller graph for this function: