Moustique
Languages and libraries
c++ networking library
SHOW HN2018
How HN took it
1 positive, 2 neutral or asking, 1 mixed, 5 critical, out of 9 comments about the project. Thread score -0.35.
Design: 1 for, 2 againstDocs: 0 for, 2 againstExecution: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Great project, commenter plans to try it
From 1 comment
While you're at it please add a namespace .. it'd make it a lot easier to administer in a project. Great project by the way - I've put it on my workbench-TODO for a little…
primitur on HN
Objections
README has spelling and language issues
From 1 comment
Since you asked, I suggest running your readme through a spell checker. I didn't bother looking further than that.
notfed on HN
Only a TCP client; claims of Linux I/O overstated
From 1 comment
Not super fair to say linux sockets (in the README) and I/O in the title when it's really just a TCP client - you force SOCK_STREAM and bind(2).
ac_slater on HN
API port and fd arguments easily confused
From 1 comment
This is the API: int moustique_listen(const char* port, G closed_connection_handler, H data_handler); int moustique_listen(int listen_fd, G closed_connection_handler, H…
petters on HN
Memory and resource leaks
From 1 comment
You've got memory leaks and resource leaks there.
SamReidHughes on HN
Requests
Use namespaces
From 3 comments
> moustique_listen What, no love for namespaces?
Koshkin on HNIt's just more C++ ish to write something::listen rather than something_listen. Namespaces are easy too. Why not?
w8rbt on HNI would. Both because it's more idiomatic and because it's inevitable more functions will be added.
RotsiserMho on HN
Separate TCP and UDP listen helpers
From 1 comment
But you're right, maybe we want two moustique_listen_tcp moustique_listen_udp helpers. I put this in my todolist.
matt42 on HN
Questions
Whether fd storage should be unordered_map or vector
From 2 comments
I haven’t developed much for Linux, but I think it’s a good idea to replace your std::vector<ctx::continuation> fibers with std::unordered_map<int, ctx::continuation> fibers.…
Const-me on HNNote that the stackoverflow post does not technically apply. accept() finds the smalles available file descriptor - it will never suddenly hand you a file descriptor of a huge…
noselasd on HN
Alternatives named
Boost ASIO with Boost coroutines
From 1 comment
Please be fair if in the readme that a comparison to ASIO is a bit apples to oranges. This one seems to be mostly a learning project, and is heavily work in progress. boost asio…
Matthias247 on HN