pub struct NetworkServiceHandles {
pub service: NetworkService,
pub sink: Litep2pNetworkSink,
pub msg_rx: Receiver<(Option<ValidatorId>, ConsensusMessage)>,
pub sync_req_rx: Receiver<IncomingSyncRequest>,
pub sync_resp_rx: Receiver<SyncResponse>,
pub peer_info_rx: Receiver<Vec<PeerStatus>>,
pub connected_count_rx: Receiver<usize>,
pub notif_connected_count_rx: Receiver<usize>,
pub mempool_tx_rx: Receiver<Vec<u8>>,
}Expand description
All handles returned by NetworkService::create.
Fields§
§service: NetworkService§sink: Litep2pNetworkSink§msg_rx: Receiver<(Option<ValidatorId>, ConsensusMessage)>§sync_req_rx: Receiver<IncomingSyncRequest>§sync_resp_rx: Receiver<SyncResponse>§peer_info_rx: Receiver<Vec<PeerStatus>>§connected_count_rx: Receiver<usize>§notif_connected_count_rx: Receiver<usize>Number of peers with an open notification (consensus) substream. Reaches >0 once the notification handshake completes, which is later than the raw connection and avoids the need for a fixed sleep.
mempool_tx_rx: Receiver<Vec<u8>>Receiver for transactions gossipped from peers via the mempool protocol.
Auto Trait Implementations§
impl !Freeze for NetworkServiceHandles
impl !RefUnwindSafe for NetworkServiceHandles
impl Send for NetworkServiceHandles
impl !Sync for NetworkServiceHandles
impl Unpin for NetworkServiceHandles
impl UnsafeUnpin for NetworkServiceHandles
impl !UnwindSafe for NetworkServiceHandles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more