Struct ts3_query::managed::ManagedConnection [−][src]
pub struct ManagedConnection { /* fields omitted */ }
This is supported on crate feature
managed
only.Expand description
QueryClient wrapper with connection-check on access
Implementations
impl ManagedConnection
[src]
impl ManagedConnection
[src]pub fn conn_id(&mut self) -> Result<ClientId, Ts3Error>
[src]
pub fn conn_id(&mut self) -> Result<ClientId, Ts3Error>
[src]Returns the current connection id (clid)
pub fn clone(&self, new_name: Option<String>) -> Result<Self, Ts3Error>
[src]
pub fn clone(&self, new_name: Option<String>) -> Result<Self, Ts3Error>
[src]Try creating a second connection, based on the configs of this one.
new_name
can specifiy a different connection client name.
pub fn new(config: ManagedConfig) -> Result<ManagedConnection, Ts3Error>
[src]
pub fn new(config: ManagedConfig) -> Result<ManagedConnection, Ts3Error>
[src]Create new TS-Connection with an optional name
pub fn force_reconnect(&mut self) -> Result<(), Ts3Error>
[src]
pub fn force_reconnect(&mut self) -> Result<(), Ts3Error>
[src]Force reconnect, may be called if server returns invalid data on call. Can happen if for example the firewall just drops packages for some time.
pub fn get(&mut self) -> Result<&mut QueryClient, Ts3Error>
[src]
pub fn get(&mut self) -> Result<&mut QueryClient, Ts3Error>
[src]Returns the active connection or fallbacks to reconnect Checks for connection health every 1 second between a get() call.