Struct solana_quic_client::QuicPool
source · pub struct QuicPool { /* private fields */ }
Trait Implementations§
source§impl ConnectionPool for QuicPool
impl ConnectionPool for QuicPool
source§fn add_connection(&mut self, config: &dyn NewConnectionConfig, addr: &SocketAddr)
fn add_connection(&mut self, config: &dyn NewConnectionConfig, addr: &SocketAddr)
Add a connection to the pool
source§fn num_connections(&self) -> usize
fn num_connections(&self) -> usize
Get the number of current connections in the pool
source§fn get(
&self,
index: usize
) -> Result<Arc<dyn BaseClientConnection>, ConnectionPoolError>
fn get(
&self,
index: usize
) -> Result<Arc<dyn BaseClientConnection>, ConnectionPoolError>
Get a connection based on its index in the pool, without checking if the
fn create_pool_entry(
&self,
config: &dyn NewConnectionConfig,
addr: &SocketAddr
) -> Arc<dyn BaseClientConnection>
source§fn borrow_connection(&self) -> Arc<dyn BaseClientConnection + 'static>
fn borrow_connection(&self) -> Arc<dyn BaseClientConnection + 'static>
Get a connection from the pool. It must have at least one connection in the pool.
This randomly picks a connection in the pool.
source§fn need_new_connection(&self, required_pool_size: usize) -> bool
fn need_new_connection(&self, required_pool_size: usize) -> bool
Check if we need to create a new connection. If the count of the connections
is smaller than the pool size.