INNER CODE UNIT · Rust

new

qaul/qaul.net · rust/libp2p_modules/qaul_messaging/src/lib.rs:36

    pub fn new(local_peer_id: PeerId) -> Self {
        Self::from_config(QaulMessagingConfig::new(local_peer_id))
    }

    /// Creates a `QaulMessaging` with the given configuration.
    pub fn from_config(config: QaulMessagingConfig) -> Self {
        QaulMessaging {
            events: VecDeque::new(),
            config,
        }
    }

    /// Send a QaulMessagingMessage to a specific node
    pub fn send_qaul_messaging_message(&mut self, node_id: PeerId, data: Vec<u8>) {
        // create event message
        let message = QaulMessagingData { data };

        // Schedule message for sending

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…