pub struct Controller { /* private fields */ }Expand description
The controller of the turn server is used to control the server and obtain server information through the HTTP interface
Implementations§
Source§impl Controller
impl Controller
Sourcepub fn new(server: &str) -> Self
pub fn new(server: &str) -> Self
Create a controller by specifying the listening address of the turn
server api interface, such as http://localhost:3000
Sourcepub async fn get_info(&self) -> Option<Message<Info>>
pub async fn get_info(&self) -> Option<Message<Info>>
Get the information of the turn server, including version information, listening interface, startup time, etc.
Sourcepub async fn get_session(&self, query: &Symbol) -> Option<Message<Session>>
pub async fn get_session(&self, query: &Symbol) -> Option<Message<Session>>
Get session information. A session corresponds to each UDP socket. It should be noted that a user can have multiple sessions at the same time.
Sourcepub async fn get_session_statistics(
&self,
query: &Symbol,
) -> Option<Message<Statistics>>
pub async fn get_session_statistics( &self, query: &Symbol, ) -> Option<Message<Statistics>>
Get session statistics, which is mainly the traffic statistics of the current session
Auto Trait Implementations§
impl Freeze for Controller
impl !RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl !UnwindSafe for Controller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more