mercredi 30 septembre 2015

How to write a test for a network listener?

I am currently writing a piece of C++ code that will listen for network connections. I'm using gtest to write unit tests but I've reached a problem I don't know how to fix:

How can I test the functions that listen for network connections? If I put this in my unit test they'll block.

Any ideas?

Aucun commentaire:

Enregistrer un commentaire