-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Async::new_nonblocking and avoid needless set_nonblocking calls #159
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/lib.rs
Outdated
|
||
fn new_nonblocking(io: T) -> io::Result<Async<T>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this public to solve #132?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in de07b6a.
connect() already sets socket to non-blocking mode.
de07b6a
to
60bb9c5
Compare
src/lib.rs
Outdated
/// On Unix systems, the handle must implement `AsRawFd`, while on Windows it must implement | ||
/// `AsRawSocket`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This is supposed to be AsFd
and AsSocket
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed.
60bb9c5
to
6ae6575
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
connect() already sets socket to non-blocking mode.
The second comment exposes Async::new_nonblocking to resolve #132.