python-network
Python module for easy networking

◆ readlines()

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

Buffer incoming data until a line is received, then call a function.

When a newline is received, all data up to that point is decoded as an utf-8 string and passed to the callback.

Parameters
callbackfunction that is called when a line is received. The line is passed as a str parameter.
errorfunction that is called when there is an error on the socket.
maxsizeused for the recv calls that are made. The returned data accumulates until a newline is received; this is not a limit on the line length.
Returns
None.

Definition at line 422 of file network.py.

Here is the call graph for this function: