git-svn-id: svn://elaine/murooma/trunk@127 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-07-31 20:16:07 +00:00
parent 32acdc83f2
commit d94f6c99da
2 changed files with 27 additions and 16 deletions

View file

@ -16,7 +16,7 @@ void receiver(zmq::socket_t* client)
{
std::string address = s_recv (*client);
// receiving and discarding'empty' message
s_recv (*client);
// s_recv (*client);
// receiving and discarding 'ready' message
std::string msg = s_recv (*client);
std::cout << "msg from " << address << ": " << msg << "\n";
@ -27,7 +27,7 @@ void receiver(zmq::socket_t* client)
void send(const std::string& address, const std::string& cmd)
{
s_sendmore (*client, address);
s_sendmore (*client, "");
// s_sendmore (*client, "");
s_send (*client, cmd);
}
@ -48,7 +48,7 @@ int main () {
std::getline(std::cin, address);
std::cout << "command: ";
std::getline(std::cin, cmd);
std::newl;
std::cout << std::endl;
send(trim(address), trim(cmd));
}
return 0;