16 void myactor(
zio::socket_t& link, std::string greeting,
bool fast_exit)
24 zio::debug(
"myactor: wait for app protocol message");
25 auto res1 = link.recv(msg);
28 assert(msg.
size() == 2);
36 zio::debug(
"myactor: simulating 1 second of work, try to Ctrl-c me");
37 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
40 zio::debug(
"myactor: waiting for termination message");
42 auto res2 = link.recv(rmsg);
59 std::this_thread::sleep_for(std::chrono::milliseconds(2000));
60 zio::debug(
"1 in main, send protocol message");
67 zio::debug(
"2 in main, no sleep, send protocol actor");
75 std::this_thread::sleep_for(std::chrono::milliseconds(2000));
76 zio::debug(
"3 in main, send protocol message");
83 zio::debug(
"4 in main, no sleep, send protocol message");
size_t send(const void *buf_, size_t len_, int flags_=0)
std::string to_string() const
size_t size() const ZMQ_NOTHROW