Module medea_coturn_telnet_client::pool[][src]

This is supported on crate feature pool only.

deadpool-based simple async pool for CoturnTelnetConnections.

You shouldn’t use deadpool directly, just use the Pool type provided by this crate instead.

Example

use std::ops::DerefMut as _;
use medea_coturn_telnet_client::pool::{Manager, Pool};

#[tokio::main]
async fn main() {
    let pool = Pool::new(Manager::new("localhost", 1234, "turn"), 16);
    pool.get()
        .await
        .expect("Failed connect to TURN server")
        .print_sessions(String::from("username"))
        .await
        .expect("Failed to print sessions");
}

Structs

Manager

Manager for creating and recycling CoturnTelnetConnections.

Type Definitions

Connection

Type alias for using deadpool::managed::Object with CoturnTelnetConnection.

Error

Type alias for using deadpool::managed::PoolError with CoturnTelnetConnection.

Pool

Type alias for using deadpool::managed::Pool with CoturnTelnetConnection.