fn send(
        &self,
        client_type: TransportClientType,
        peer_id: &NodeId,
        _flow_tag: FlowTag,
        message: TransportPayload,
    ) -> Result<(), TransportErrorCode> {
        let peer_id = *peer_id;
        let id = self.id;
        let weak_self = self.weak_self.read().unwrap().clone();
        let arc_self = weak_self.upgrade().unwrap();
        tokio::task::spawn(async move {
            arc_self
                .send_helper(client_type, id, peer_id, message)
                .await
        });
        Ok(())
    }
/// Send the message to the specified peer. The message will be en-queued
/// into the appropriate TxQ based on the TransportQueueConfig.
Send the message to the specified peer. The message will be en-queued
into the appropriate TxQ based on the TransportQueueConfig.
Send the message to the specified peer . The message will be en - queued into the appropriate TxQ based on the TransportQueueConfig .
fn send(
        &self,
        client_type: TransportClientType,
        peer_id: &NodeId,
        _flow_tag: FlowTag,
        message: TransportPayload,
    ) -> Result<(), TransportErrorCode> {
        let peer_id = *peer_id;
        let id = self.id;
        let weak_self = self.weak_self.read().unwrap().clone();
        let arc_self = weak_self.upgrade().unwrap();
        tokio::task::spawn(async move {
            arc_self
                .send_helper(client_type, id, peer_id, message)
                .await
        });
        Ok(())
    }
fn send ( & self , client_type : TransportClientType , peer_id : & NodeId , _flow_tag : FlowTag , message : TransportPayload , ) -> Result < ( ) , TransportErrorCode > { let peer_id = * peer_id ; let id = self . id ; let weak_self = self . weak_self . read ( ) . unwrap ( ) . clone ( ) ; let arc_self = weak_self . upgrade ( ) . unwrap ( ) ; tokio :: task :: spawn ( async move { arc_self . send_helper ( client_type , id , peer_id , message ) . await } ) ; Ok ( ( ) ) }
Send the message to the specified peer.
Send the message to the specified peer .
&self
client_type
TransportClientType
peer_id
&NodeId
_flow_tag
FlowTag
message
TransportPayload
&self
client_type
TransportClientType
peer_id
&NodeId
_flow_tag
FlowTag
message
TransportPayload