Loading...
Searching...
No Matches

close
connections
disconnect_cb
rawread
read
readlines
recv
remote
send
sendline
socket
tls
unread

## readlines()

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

  callback | function that is called when a line is received. The line is passed as a str parameter.
  error | function that is called when there is an error on the socket.
  maxsize | used 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: