Martin Sustrik

Results 159 comments of Martin Sustrik

Ok, example is better than words. Here's my idea how to do vertically-composed connection setup: ``` int h1 = tcp(...); // open tcp connection int h2 = throttler(h1, ...); //...

Some minor comments: 1. Consistent handling of socket setup is hard. Try to come up with common API for TCP (connected), UDP (not connected), SSL (large amount of setup options),...

Ok, got few hours free, done some work. 1. I've changed the API in such a way as not to allow partial sends/recvs. Either you transfer all the bytes or...

And for a good measure, PFX protocol (messages prefixed by 64-bit size in network byte order).

And an attempt at an API RFC: https://raw.githubusercontent.com/sustrik/dsock/master/rfc/sock-api-revamp-01.txt

I've been down both the ways. The bprocess way leads to callback hell - that's what happened in ZeroMQ - and bwait leads to a state machine hell - see...

Ok, I've added a slight optimisation to CRLF protocol. It used to do two virtual function calls per byte -- hquery and brecvv -- and now it does only brecvv....

I am still not sure about it. The only difference would be whether the function call is done inside the loop or outside of it. It would mean less function...

Unfortunately, this looks like a bug in dns.c. The project can be found here: https://github.com/wahern/dns

Yes, it seems to be a bug and I am open to PRs.