• Home
  • Raw
  • Download

Lines Matching +full:url +full:- +full:connection +full:- +full:client

3 Mio is a fast, low-level I/O library for Rust focusing on non-blocking APIs and
7 [![Crates.io][crates-badge]][crates-url]
8 [![MIT licensed][mit-badge]][mit-url]
9 [![Build Status][actions-badge]][actions-url]
10 [![Build Status][cirrus-badge]][cirrus-url]
12 [crates-badge]: https://img.shields.io/crates/v/mio.svg
13 [crates-url]: https://crates.io/crates/mio
14 [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
15 [mit-url]: LICENSE
16 [actions-badge]: https://github.com/tokio-rs/mio/workflows/CI/badge.svg
17 [actions-url]: https://github.com/tokio-rs/mio/actions?query=workflow%3ACI+branch%3Amaster
18 [cirrus-badge]: https://api.cirrus-ci.com/github/tokio-rs/mio.svg
19 [cirrus-url]: https://cirrus-ci.com/github/tokio-rs/mio
39 `TcpListener` and `TcpStream`. Note that `features = ["os-poll", "net"]` must be
50 const CLIENT: Token = Token(1);
52 fn main() -> Result<(), Box<dyn Error>> {
65 // Setup the client socket.
66 let mut client = TcpStream::connect(addr)?;
69 .register(&mut client, CLIENT, Interest::READABLE | Interest::WRITABLE)?;
82 // If this is an event for the server, it means a connection
85 // Accept the connection and drop it immediately. This will
86 // close the socket and notify the client of the EOF.
87 let connection = server.accept();
88 drop(connection);
90 CLIENT => {
99 // Since the server just shuts down the connection, let's
113 * Non-blocking TCP, UDP
118 ## Non-goals
121 or higher-level libraries.
124 * Thread pools / multi-threaded event loop
159 [issue #1472]: https://github.com/tokio-rs/mio/issues/1472
160 [issue #1152]: https://github.com/tokio-rs/mio/issues/1152
161 [issue #1444]: https://github.com/tokio-rs/mio/issues/1444
179 Finally, be kind. We support the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-