python-network
Python module for easy networking

◆ read()

def network.Socket.read (   self,
  callback,
  error = None,
  maxsize = 4096 
)

Register function to be called when data is received.

When data is available, read it and call this function. The data that was remaining in the line buffer, if any, is sent to the callback immediately.

Parameters
callbackfunction to call when data is available. The data is passed as a parameter.
errorfunction to be called if there is an error on the socket.
maxsizebuffer size that is used for the recv call.
Returns
None.

Definition at line 364 of file network.py.

Here is the call graph for this function: