Skip to content
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

does socket2 support select? #296

Closed
keepsimple1 opened this issue Mar 18, 2022 · 4 comments
Closed

does socket2 support select? #296

keepsimple1 opened this issue Mar 18, 2022 · 4 comments

Comments

@keepsimple1
Copy link

Is there any support of select (as in Unix) or something similar?

@Thomasdezeeuw
Copy link
Collaborator

Not in socket2, I would consider it out of scope for socket2. However if you're looking for something like epoll/kqueue you can consider Mio.

@keepsimple1
Copy link
Author

socket2 already depends on libc and winapi, thus has the tools needed to support something like select. In fact, the poll_connect function seems to do something similar, on windows and on Unix.

@Thomasdezeeuw
Copy link
Collaborator

socket2 already depends on libc and winapi, thus has the tools needed to support something like select. In fact, the poll_connect function seems to do something similar, on windows and on Unix.

I know and I felt that was out of scope already, but the std lib's TcpSocketalso had it, so we decided in the end to add it back again. But select is really out of scope for socket2.

@keepsimple1
Copy link
Author

I understand that. On the other hand, it seems to me that Rust net/socket ecosystem fragmented too much. The std::net is missing lots of important features, while 3rd-party crates are overlapping each other and often times we have to pull in a new dependency to just call a single common function.

It's not socket2's fault. But I am worried that the situation hurts the productivity of many Rust users. The ideal case is that std::net can be fixed to cover all the bases, but I don't know if that will ever happen. Sorry for ranting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants