Struct ckb_network::network::NetworkService
source · pub struct NetworkService<T> { /* private fields */ }Expand description
Ckb network service, use to start p2p network
Implementations§
source§impl<T: ExitHandler> NetworkService<T>
impl<T: ExitHandler> NetworkService<T>
sourcepub fn new(
network_state: Arc<NetworkState>,
protocols: Vec<CKBProtocol>,
required_protocol_ids: Vec<ProtocolId>,
identify_announce: (String, String, Flags),
exit_handler: T
) -> Self
pub fn new( network_state: Arc<NetworkState>, protocols: Vec<CKBProtocol>, required_protocol_ids: Vec<ProtocolId>, identify_announce: (String, String, Flags), exit_handler: T ) -> Self
init with all config
Auto Trait Implementations§
impl<T> !RefUnwindSafe for NetworkService<T>
impl<T> Send for NetworkService<T>where T: Send,
impl<T> !Sync for NetworkService<T>
impl<T> Unpin for NetworkService<T>where T: Unpin,
impl<T> !UnwindSafe for NetworkService<T>
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