Closed
Description
The net
module has a few things which I would like to consider improving:
- Must the
Acceptor
andListener
traits exists? It's a shame having to import the traits just to make a simple server. - Does the layout make sense?
std::io::net::ip
is quite long. Possibly a top-levelnet
module? Possibly shorten using reexports? - What more needs to be exported? The current primitives implement the basic Reader/Writer traits, but not much beyond that. There are many methods provided by librustuv/libnative which are not exported. Need to make sure the signatures are correct.
- "Unix pipes" are not unix pipes on windows (they are named pipes)
Wish list
-
TcpStream::open("google.com:80")
does not work - I can clone a tcp stream, but I cannot close that duplicate tcp stream (from my owned stream)
- Creating a server is quite wordy. There are a number of imports, lots of ip addr configuration, lots of listening/accepting, etc.
Nominating, I believe it is quite important to have a solid networking story.