Struct tokio_jsonrpc::endpoint::ServerCtl
[−]
[src]
pub struct ServerCtl(_);
A handle to control the server.
An instance is provided to each Server
callback and it can be
used to manipulate the server (currently only to terminate the server) or to create a client
for the use of the server.
Methods
impl ServerCtl
[src]
fn terminate(&self)
Stop answering RPCs and calling notifications.
Also terminate the connection if the client handle has been dropped and all ongoing RPC answers were received.
fn kill(&self)
Kill the connection.
Like, right now. Without a goodbye.
fn client(&self) -> Client
Create a new client for the current endpoint.
This is a way in which the server may access the other endpoint (eg. call RPCs or send notifications to the other side).
Panics
If called after kill
or terminate
has been called previously.
Trait Implementations
impl Clone for ServerCtl
[src]
fn clone(&self) -> ServerCtl
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more