TcpConnection.onData
Set the inbound data callback.
Fires when data arrives. The data parameter is borrowed — valid only for the duration of the callback. Copy it if needed beyond. Thread affinity: event loop thread only. Non-reentrant.
Parameters
callback | Callback invoked when data is received. |