mercredi 13 mai 2015

Own std::istream with callback or event to avoid pull or blocking read

I want to use an own implementation of std::stream to encapsulate a tcp/ip socket. The main problem I face at the moment is, that in an event driven system I do not want to block the read operation. What I searching for is a standard way to register a callback/event to tell the consuming unit that there are bytes to read. I did not find something in the std::iostream area. Is there a conform solution or have I still to introduce my own interface with function binding?

Aucun commentaire:

Enregistrer un commentaire