code example: do start before register_protocol (#3947)
This commit is contained in:
parent
be75cbfaaa
commit
b444d23b3a
@ -45,8 +45,8 @@
|
||||
//!
|
||||
//! fn main () {
|
||||
//! let mut service = NetworkService::new(NetworkConfiguration::new_local()).expect("Error creating network service");
|
||||
//! service.register_protocol(Arc::new(MyHandler), *b"myp", 1, &[1u8]);
|
||||
//! service.start().expect("Error starting service");
|
||||
//! service.register_protocol(Arc::new(MyHandler), *b"myp", 1, &[1u8]);
|
||||
//!
|
||||
//! // Wait for quit condition
|
||||
//! // ...
|
||||
|
Loading…
Reference in New Issue
Block a user