上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 119 下一页
摘要: 环境 Time 2022-01-13 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/net/struct.UdpSocket.html 之前使用 Mio 实现了一个简单的 UDP 服务器,再使用 Tokio 实现。 阅读全文
posted @ 2022-03-31 18:23 jiangbo4444 阅读(657) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-13 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://tokio.rs/tokio/tutorial/io 示例 main.rs use tokio::net::TcpListener; #[tokio::main] async fn m 阅读全文
posted @ 2022-03-31 18:22 jiangbo4444 阅读(129) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-13 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/index.html 之前使用 Mio 实现了一个简单的 TCP 服务器,再使用 Tokio 实现。 练习使用,不可用于生产环境。 阅读全文
posted @ 2022-03-31 18:22 jiangbo4444 阅读(878) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-12 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/sync/index.html 示例 main.rs use tokio::sync::{mpsc, oneshot}; #[to 阅读全文
posted @ 2022-03-30 09:42 jiangbo4444 阅读(158) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-12 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/fs/struct.File.html 示例 main.rs use tokio::{fs::File, io::AsyncWri 阅读全文
posted @ 2022-03-30 09:41 jiangbo4444 阅读(718) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-12 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/fs/struct.File.html 示例 读取一行 use tokio::fs::File; use tokio::io::{ 阅读全文
posted @ 2022-03-30 09:40 jiangbo4444 阅读(648) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-12 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/sync/index.html mpsc 可以实现多对一的消息通信,表示:Multi-producer, single-consu 阅读全文
posted @ 2022-03-30 09:39 jiangbo4444 阅读(189) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-12 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/sync/index.html 示例 main.rs use std::time::Duration; use tokio::{s 阅读全文
posted @ 2022-03-30 09:38 jiangbo4444 阅读(174) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-12 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/sync/index.html 示例 main.rs use std::time::Duration; use tokio::{s 阅读全文
posted @ 2022-03-30 09:37 jiangbo4444 阅读(103) 评论(0) 推荐(0)
摘要: 环境 Time 2022-01-12 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://docs.rs/tokio/latest/tokio/sync/index.html mpsc 可以实现多对一的消息通信,表示:Multi-producer, single-consu 阅读全文
posted @ 2022-03-30 09:36 jiangbo4444 阅读(168) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 119 下一页