missing net_ methods
This commit is contained in:
parent
b13d68c7e9
commit
f8568e10b7
@ -10,11 +10,16 @@ pub trait Net: Sized + Send + Sync + 'static {
|
||||
/// Returns number of peers connected to node.
|
||||
fn peer_count(&self, _: Params) -> Result<Value, Error> { rpc_unimplemented!() }
|
||||
|
||||
/// Returns true if client is actively listening for network connections.
|
||||
/// Otherwise false.
|
||||
fn is_listening(&self, _: Params) -> Result<Value, Error> { rpc_unimplemented!() }
|
||||
|
||||
/// Should be used to convert object to io delegate.
|
||||
fn to_delegate(self) -> IoDelegate<Self> {
|
||||
let mut delegate = IoDelegate::new(Arc::new(self));
|
||||
delegate.add_method("net_version", Net::version);
|
||||
delegate.add_method("net_peerCount", Net::peer_count);
|
||||
delegate.add_method("net_listening", Net::is_listening);
|
||||
delegate
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user