solana_connection_cache::client_connection

Trait ClientConnection

source
pub trait ClientConnection: Sync + Send {
    // Required methods
    fn server_addr(&self) -> &SocketAddr;
    fn send_data(&self, buffer: &[u8]) -> TransportResult<()>;
    fn send_data_async(&self, buffer: Vec<u8>) -> TransportResult<()>;
    fn send_data_batch(&self, buffers: &[Vec<u8>]) -> TransportResult<()>;
    fn send_data_batch_async(
        &self,
        buffers: Vec<Vec<u8>>,
    ) -> TransportResult<()>;
}

Required Methods§

source

fn server_addr(&self) -> &SocketAddr

source

fn send_data(&self, buffer: &[u8]) -> TransportResult<()>

source

fn send_data_async(&self, buffer: Vec<u8>) -> TransportResult<()>

source

fn send_data_batch(&self, buffers: &[Vec<u8>]) -> TransportResult<()>

source

fn send_data_batch_async(&self, buffers: Vec<Vec<u8>>) -> TransportResult<()>

Implementors§