Update mod.rs
This commit is contained in:
parent
205a1990d6
commit
9ec2efb2f3
@ -13,20 +13,20 @@
|
|||||||
//! data: u32
|
//! data: u32
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! impl IoHandler<MyMessage> for MyHandler {
|
//! impl IoHandler<MyMessage> for MyHandler {
|
||||||
//! fn initialize(&self, io: &IoContext<MyMessage>) {
|
//! fn initialize(&self, io: &IoContext<MyMessage>) {
|
||||||
//! io.register_timer(0, 1000).unwrap();
|
//! io.register_timer(0, 1000).unwrap();
|
||||||
//! }
|
|
||||||
//!
|
|
||||||
//! fn timeout(&self, _io: &IoContext<MyMessage>, timer: TimerToken) {
|
|
||||||
//! println!("Timeout {}", timer);
|
|
||||||
//! }
|
|
||||||
//!
|
|
||||||
//! fn message(&self, _io: &IoContext<MyMessage>, message: &MyMessage) {
|
|
||||||
//! println!("Message {}", message.data);
|
|
||||||
//! }
|
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
|
//! fn timeout(&self, _io: &IoContext<MyMessage>, timer: TimerToken) {
|
||||||
|
//! println!("Timeout {}", timer);
|
||||||
|
//! }
|
||||||
|
//!
|
||||||
|
//! fn message(&self, _io: &IoContext<MyMessage>, message: &MyMessage) {
|
||||||
|
//! println!("Message {}", message.data);
|
||||||
|
//! }
|
||||||
|
//! }
|
||||||
|
//!
|
||||||
//! fn main () {
|
//! fn main () {
|
||||||
//! let mut service = IoService::<MyMessage>::start().expect("Error creating network service");
|
//! let mut service = IoService::<MyMessage>::start().expect("Error creating network service");
|
||||||
//! service.register_handler(Arc::new(MyHandler)).unwrap();
|
//! service.register_handler(Arc::new(MyHandler)).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user