code example: do start before register_protocol (#3947)

This commit is contained in:
Paul Peregud 2016-12-22 16:15:26 +01:00 committed by Arkadiy Paronyan
parent be75cbfaaa
commit b444d23b3a

View File

@ -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
//! // ...