Lines Matching +full:repo +full:- +full:token
1 // You can run this example from the root of the mio repo:
2 // cargo run --example udp_server --features="os-poll net"
4 use mio::{Events, Interest, Poll, Token};
7 // A token to allow us to identify which event is for the `UdpSocket`.
8 const UDP_SOCKET: Token = Token(0);
11 fn main() -> io::Result<()> { in main()
27 // Register our socket with the token defined above and an interest in being in main()
33 println!(" $ nc -u 127.0.0.1 9000"); in main()
47 // Validate the token we registered our socket with, in main()
50 match event.token() { in main()
73 // `UdpSocket` using the `UDP_SOCKET` token, but if it ever in main()
75 warn!("Got event for unexpected token: {:?}", event); in main()