diff options
author | Guido Goldstein <zmq@a-nugget.de> | 2010-08-28 06:31:40 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-08-28 06:31:40 +0200 |
commit | 67aa788577fb49474dd7329b14316d25f1b3c08b (patch) | |
tree | 83a843db53e748c5ca53729f2780919b6c099b2c /tests/testutil.hpp | |
parent | 4d9b046977f895f8d61731672a5e84967ed85eb2 (diff) |
Fixed socket states in tests
Diffstat (limited to 'tests/testutil.hpp')
-rw-r--r-- | tests/testutil.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 7c0a127..3e9f954 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -55,8 +55,12 @@ namespace zmqtestutil zmq::message_t pong; s2.recv (&pong, 0); + // Send message via s2, so state is clean in case of req/rep. + std::string ret((char *)pong.data(), pong.size()); + s2.send(pong, 0); + // Return received data as std::string. - return std::string ((char*) pong.data(), pong.size()); + return ret ; } } |