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]

Stop answering RPCs and calling notifications.

Also terminate the connection if the client handle has been dropped and all ongoing RPC answers were received.

Kill the connection.

Like, right now. Without a goodbye.

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more