[−][src]Module ts3_query::managed
This is supported on
feature="managed" only.Managed connection module.
Handles reconnection and name uniqueness.
Wraps a normal query connection with health checks. Handles renaming and claimed names.
Useful if running long-lasting connections which tend to break over the wire.
use ts3_query::*; let cfg = managed::ManagedConfig::new("127.0.0.1:10011",9987,"serveradmin".into(),"asdf".into())? .name("my bot".to_string()); let mut conn = managed::ManagedConnection::new(cfg)?; // get inner connection with check for being alive // then perform a command on it let _ = conn.get()?.whoami(false)?;
Structs
| ManagedConfig | feature="managed"Config for creating a managed connection |
| ManagedConnection | feature="managed"QueryClient wrapper with connection-check on access |
Constants
| DEFAULT_TIMEOUT_CMD | feature="managed"Default timeout for sending/receiving |
| DEFAULT_TIMEOUT_CONN | feature="managed"Default connection timeout |
| MAX_LEN_NAME | feature="managed"Max name length to allow unique names |
Type Definitions
| TsConID | feature="managed"Ts client connection ID |