Skip to content

Commit 4714ca1

Browse files
authored
net: clarify the platform-dependent backlog in TcpSocket docs (#7738)
1 parent 5e3ad02 commit 4714ca1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tokio/src/net/tcp/socket.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ cfg_net! {
6868
/// socket.set_reuseaddr(true)?;
6969
/// socket.bind(addr)?;
7070
///
71+
/// // Note: the actual backlog used by `TcpListener::bind` is platform-dependent,
72+
/// // as Tokio relies on Mio's default backlog value configuration. The `1024` here is only
73+
/// // illustrative and does not reflect the real value used.
7174
/// let listener = socket.listen(1024)?;
7275
/// # drop(listener);
7376
///

0 commit comments

Comments
 (0)