rostrum 14.0.1

An efficient implementation of Electrum Server with token support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use anyhow::Result;
use async_trait::async_trait;
use serde_json::Value;
use tokio::sync::mpsc::Sender;

use super::Message;

#[async_trait]
pub trait Communcation: Send + Sync {
    /// Sending messages to the client
    async fn send_values(&mut self, values: &[Value]) -> Result<()>;

    /// Feed rpc queue with requests from client
    fn start_request_receiver(&mut self, rpc_queue_sender: Sender<Message>, idle_timeout: u64);

    /// End connection
    async fn shutdown(&mut self);
}