Parameters
function
required
Called as
callback(packet) for each incoming packet.Behavior
SetDataandBlockdo not apply inbound. They are only valid inside a send hook and raise if called here.- Inbound capture depends on the transport. Check the
inboundfield ofstats; if it isfalsethis hook will not be called. - Errors are contained: a raising hook is logged and skipped.
Example
Errors
Related
remove_receive_hook: remove it.on_receive: the record-based listener.