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

## 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

  callback | function to call when data is available. The data is passed as a parameter.
  error | function to be called if there is an error on the socket.
  maxsize | buffer size that is used for the recv call.

Returns
  None.

Definition at line 393 of file network.py.

Here is the call graph for this function: