Struct jsonrpc_pubsub::Session [−][src]
pub struct Session { /* fields omitted */ }RPC client session Keeps track of active subscriptions and unsubscribes from them upon dropping.
Implementations
impl Session[src]
impl Session[src]pub 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.
pub fn sender(&self) -> Sender<String>[src]
Returns transport write stream
pub fn on_drop<F: FnOnce() + Send + 'static>(&self, on_drop: F)[src]
Adds a function to call when session is dropped.