add comment about the usage of Arc

This commit is contained in:
Stefan Lankes 2020-06-15 09:29:32 +02:00
parent 6c983a7335
commit a8e3746e91
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,9 @@ impl Drop for Socket {
}
}
// Arc is used to count the number of used sockets.
// Only if all sockets are released, the drop
// method will close the socket.
#[derive(Clone)]
pub struct TcpStream(Arc<Socket>);