News for hackers. Stuff that matters.
Re:Network protocols, sans I/O by Lukasa on Sunday August 07, 2016 @03:59PM (#12243386)
It turns out TLS isn't that bad.

OpenSSL exposes a "memory BIO", which is basically exactly this. You send in writes, and then emit data when you can, and in the meantime it buffers.

It's a bit more limited than that, but generally speaking it's not too bad.

Re:Network protocols, sans I/O by JoshTriplett on Sunday August 07, 2016 @05:04PM (#12243647)
I assume you handle decompression the same way? Feed in data, and the decompressor emits data when it can?