]> git.feebdaed.xyz Git - 0xmirror/tokio.git/commitdiff
net: clarify the platform-dependent backlog in `TcpSocket` docs (#7738)
authorSeaker <seakerone@proton.me>
Sun, 16 Nov 2025 10:44:35 +0000 (10:44 +0000)
committerGitHub <noreply@github.com>
Sun, 16 Nov 2025 10:44:35 +0000 (18:44 +0800)
tokio/src/net/tcp/socket.rs

index a168154d4a3ac1b69a95c028a52c9e6f6fe4c8fd..eb3ea510923aec5b4e3987875f375b6adc532bad 100644 (file)
@@ -68,6 +68,9 @@ cfg_net! {
     ///     socket.set_reuseaddr(true)?;
     ///     socket.bind(addr)?;
     ///
+    ///     // Note: the actual backlog used by `TcpListener::bind` is platform-dependent,
+    ///     // as Tokio relies on Mio's default backlog value configuration. The `1024` here is only
+    ///     // illustrative and does not reflect the real value used.
     ///     let listener = socket.listen(1024)?;
     /// # drop(listener);
     ///