Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit f8568e1

Browse files
committed
missing net_ methods
1 parent b13d68c commit f8568e1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rpc/src/v1/traits/net.rs

+5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ pub trait Net: Sized + Send + Sync + 'static {
1010
/// Returns number of peers connected to node.
1111
fn peer_count(&self, _: Params) -> Result<Value, Error> { rpc_unimplemented!() }
1212

13+
/// Returns true if client is actively listening for network connections.
14+
/// Otherwise false.
15+
fn is_listening(&self, _: Params) -> Result<Value, Error> { rpc_unimplemented!() }
16+
1317
/// Should be used to convert object to io delegate.
1418
fn to_delegate(self) -> IoDelegate<Self> {
1519
let mut delegate = IoDelegate::new(Arc::new(self));
1620
delegate.add_method("net_version", Net::version);
1721
delegate.add_method("net_peerCount", Net::peer_count);
22+
delegate.add_method("net_listening", Net::is_listening);
1823
delegate
1924
}
2025
}

0 commit comments

Comments
 (0)