fpagliughi / sockpp

Modern C++ socket library.
BSD 3-Clause "New" or "Revised" License
792 stars 126 forks source link

select #49

Closed bmahlbrand closed 1 year ago

bmahlbrand commented 4 years ago

Great library! Any interest in integrating select?

If so, I'm interested in working on that, but I'm curious what your thoughts are on how it would best fit into the library / future plans you might have.

fpagliughi commented 4 years ago

Although that might be cool, I think it's way beyond the scope of this library.

This lib is meant to be portable across the the main O/S's: *nix, Windows, and Mac. For that we'd probably need to make compatible implementations that use Epoll, Kqueue, and IOCP, which would be a large undertaking. If you want that, it would probably be better to look to use Boost ASIO. It's stable, tested, and well-known.

I've mainly thought that a key feature of the library is that it's "simple". If you know socket programming, there's nothing new to learn here. You can crank out a small TCP client in no time.

That said, I've mostly been programming in Rust the last few years. Over there they have the mio library ("Metal I/O"?), which is just a portable layer over the platform async implementations Epoll, Kqueue, and IOCP. In Rust, mio is the de facto base for all async libraries; it's pervasive across the ecosystem.

It would be awesome to have something similar in C++. I don't know of anything at the moment. I would definitely use it. I might even help.