I know that Thrift is mainly aimed at full fledged client-server RPC but looking at the high level architecture it seems to me that it should be perfectly usable for bidirectional message passing as well. 

What I would like to build on both ends (C, .NET Core) is following:

* Receive method: has reference to a socket, reads a full message, deserializes it, returns it
* Send method: has reference to a socket, serializes a given message, sends it to the wire.

I don't need threading servers, ... anything fancy. Essentially what I would love to get on top of what e.g. Protobuffs offers is out-of-box handling of buffering the whole message on receive end & generally message framing.

The problem is that I wasn't able to find any documentation on how to start building that using the current libs (I'm personally interested in .NET Core and C ones) APIs. The only thing I've found is this [question](https://stackoverflow.com/questions/15439317/thrift-for-bidirectional-messaging) but it doesn't really point to any resources.