pub trait TxHandler: TxBaseHandler {
// Provided methods
fn preflight_gather_outgoing(&self, peer_url: Url) -> K2Result<Bytes> { ... }
fn preflight_validate_incoming(
&self,
peer_url: Url,
data: Bytes,
) -> K2Result<()> { ... }
}Expand description
Handler for whole transport-level events.
Provided Methods§
Sourcefn preflight_gather_outgoing(&self, peer_url: Url) -> K2Result<Bytes>
fn preflight_gather_outgoing(&self, peer_url: Url) -> K2Result<Bytes>
Gather preflight data to send to a new opening connection. Returning an Err result will close this connection.
The default implementation sends an empty preflight message.