async fn send_advert(count: usize, handler: &P2PEventHandlerImpl, peer_id: NodeId) {
        for i in 0..count {
            let message = GossipMessage::Advert(make_gossip_advert(i as u64));
            let message = TransportPayload(pb::GossipMessage::proxy_encode(message).unwrap());
            let _ = handler
                .send_message(
                    FlowId {
                        client_type: TransportClientType::P2P,
                        peer_id,
                        flow_tag: FlowTag::from(0),
                    },
                    message,
                )
                .await;
        }
    }
/// The function sends the given number of messages to the peer with the
/// given node ID.
The function sends the given number of messages to the peer with the
given node ID.
The function sends the given number of messages to the peer with the given node ID .
async fn send_advert(count: usize, handler: &P2PEventHandlerImpl, peer_id: NodeId) {
        for i in 0..count {
            let message = GossipMessage::Advert(make_gossip_advert(i as u64));
            let message = TransportPayload(pb::GossipMessage::proxy_encode(message).unwrap());
            let _ = handler
                .send_message(
                    FlowId {
                        client_type: TransportClientType::P2P,
                        peer_id,
                        flow_tag: FlowTag::from(0),
                    },
                    message,
                )
                .await;
        }
    }
async fn send_advert ( count : usize , handler : & P2PEventHandlerImpl , peer_id : NodeId ) { for i in 0 .. count { let message = GossipMessage :: Advert ( make_gossip_advert ( i as u64 ) ) ; let message = TransportPayload ( pb :: GossipMessage :: proxy_encode ( message ) . unwrap ( ) ) ; let _ = handler . send_message ( FlowId { client_type : TransportClientType :: P2P , peer_id , flow_tag : FlowTag :: from ( 0 ) , } , message , ) . await ; } }
The function sends the given number of messages to the peer with the
given node ID.
The function sends the given number of messages to the peer with the given node ID .
count
usize
handler
&P2PEventHandlerImpl
peer_id
NodeId
count
usize
handler
&P2PEventHandlerImpl
peer_id
NodeId