Closed
Description
The incoming
iterator never returns None
, so the drop
at the end will never be reached. The explicit matching against the socket result also seems potentially nonconventional docs-wise?
https://doc.rust-lang.org/std/net/struct.TcpListener.html#examples
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
abonander commentedon Aug 23, 2016
Also, what are the semantics of this iterator when the listener is set to nonblocking mode? If it's equivalent to
accept()
it should run the loop withWouldBlock
errors until a connection is made.sfackler commentedon Aug 23, 2016
That's what it'd do, yeah. The
next
method is super simple: https://doc.rust-lang.org/src/std/up/src/libstd/sys/unix/ext/net.rs.html#532Clean up TcpStream example
Rollup merge of rust-lang#41526 - steveklabnik:gh35950, r=GuillaumeGomez
Rollup merge of rust-lang#41526 - steveklabnik:gh35950, r=GuillaumeGomez
Clean up TcpStream example
Rollup merge of rust-lang#41526 - steveklabnik:gh35950, r=GuillaumeGomez
Rollup merge of rust-lang#41526 - steveklabnik:gh35950, r=GuillaumeGomez
Rollup merge of rust-lang#41526 - steveklabnik:gh35950, r=GuillaumeGomez