1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Async I/O for the ESP IDF (and possibly other MCU RTOSes supporting the [select] call and BSD Sockets).
//!
//! This crate provides [`Async`], an adapter for standard networking types (and [many other] types) to use in
//! async programs.
//!
//! # Implementation
//!
//! The first time [`Async`] is used, a thread called "async-io-mini" will be spawned.
//! The purpose of this thread is to wait for I/O events reported by the OS, and then
//! wake appropriate futures blocked on I/O when they can be resumed.
//!
//! To wait for the next I/O event, the task uses the [select] syscall available on many operating systems.
//!
//! # Examples
//!
//! Connect to `example.com:80`.
//!
//! ```
//! use async_io_mini::Async;
//!
//! use std::net::{TcpStream, ToSocketAddrs};
//!
//! # futures_lite::future::block_on(async {
//! let addr = "example.com:80".to_socket_addrs()?.next().unwrap();
//!
//! let stream = Async::<TcpStream>::connect(addr).await?;
//! # std::io::Result::Ok(()) });
//! ```
pub use *;
pub use *;