上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 111 下一页
摘要: 环境 Time 2022-01-13 Rust 1.57.0 Tokio 1.15.0 概念 参考:https://tokio.rs/tokio/tutorial Tokio 是 Rust 编程语言的异步运行时。它提供了编写网络应用程序所需的构建基础。它提供了针对各种系统的灵活性,从具有数十个内核的 阅读全文
posted @ 2022-03-31 18:24 jiangbo4444 阅读(902) 评论(0) 推荐(0)
摘要: 环境 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 阅读(647) 评论(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 阅读(122) 评论(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 阅读(866) 评论(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 阅读(149) 评论(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 阅读(699) 评论(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 阅读(636) 评论(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 阅读(187) 评论(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 阅读(166) 评论(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 阅读(96) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 111 下一页