INNER CODE UNIT · Rust
on_connection_handler_event
qaul/qaul.net · rust/libp2p_modules/qaul_messaging/src/lib.rs:66
fn on_connection_handler_event(
&mut self,
peer_id: PeerId,
_connection: ConnectionId,
event: Result<InnerMessage, StreamUpgradeError<std::io::Error>>,
) {
// We received one of the following event notification
let qaul_messaging_data = match event {
// only process a received message
Ok(InnerMessage::Received(event)) => event,
// ignore the sent event
Ok(InnerMessage::Sent) => return,
Err(e) => {
log::error!("{}", e);
return;
}
};