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§