net: clarify the platform-dependent backlog in TcpSocket docs (#7738)

This commit is contained in:
Seaker
2025-11-16 18:44:35 +08:00
committed by GitHub
parent 5e3ad02fb1
commit 4714ca168d
+3
View 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);
///