Struct jsonrpc_pubsub::Session
[−]
[src]
pub struct Session { /* fields omitted */ }
RPC client session Keeps track of active subscriptions and unsubscribes from them upon dropping.
Methods
impl Session
[src]
fn new(sender: Sender<String>) -> Self
[src]
Creates new session given transport raw send capabilities.
Session should be created as part of metadata, sender
should be returned by transport.
fn sender(&self) -> Sender<String>
[src]
Returns transport write stream
fn on_drop(&self, on_drop: Box<Fn() + Send>)
[src]
Adds a function to call when session is dropped.