You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the function should take a SocketAddr as argument instead of a libc::sockaddr (so connect() would do the conversion), I'd like to add an Ordering argument (to try and link a read or write just after connecting), and I'm ambivalent about requiring net2, but std::net:TcpStream does not allow creation of a socket outside of TcpStream::connect() or TcpListener::accept().
What do you think?
The text was updated successfully, but these errors were encountered:
I'm ambivalent about requiring net2, but std::net:TcpStream does not allow creation of a socket outside of TcpStream::connect() or TcpListener::accept()
Perhaps this discussion is relevant where I propose that a builder for unconnected sockets should be added to the stdlib: rust-lang/rust#68053
hello! I am implementing the connect() operation and need some advice on the API. The call looks like this:
And it is called like this:
(I took the
addr2raw
function from https://github.com/rust-lang-nursery/net2-rs/blob/eda403f03033b58560d81b821f0df822f50cde4d/src/socket.rs#L87-L96 ).I think the function should take a
SocketAddr
as argument instead of alibc::sockaddr
(soconnect()
would do the conversion), I'd like to add anOrdering
argument (to try and link a read or write just after connecting), and I'm ambivalent about requiringnet2
, butstd::net:TcpStream
does not allow creation of a socket outside ofTcpStream::connect()
orTcpListener::accept()
.What do you think?
The text was updated successfully, but these errors were encountered: