diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-08-03 11:30:13 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-08-03 11:30:13 +0200 |
commit | cc3755a16f00026af882ed14d122cc8aa6d50e82 (patch) | |
tree | 33a2197bab1bd6068dbfcc446fe70aaa07808fa9 /examples/chat/chatroom.cpp | |
parent | 183b6887644ac05c951a3f9143248ed86e91052f (diff) |
renamed from zs to zmq
Diffstat (limited to 'examples/chat/chatroom.cpp')
-rw-r--r-- | examples/chat/chatroom.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/chat/chatroom.cpp b/examples/chat/chatroom.cpp index f2240ab..4cf123a 100644 --- a/examples/chat/chatroom.cpp +++ b/examples/chat/chatroom.cpp @@ -23,7 +23,7 @@ using namespace std; -#include <zs.hpp> +#include <zmq.hpp> int main (int argc, const char *argv []) { @@ -38,19 +38,19 @@ int main (int argc, const char *argv []) const char *out_interface = argv [2]; // Initialise 0MQ infrastructure - zs::context_t ctx (1, 1); + zmq::context_t ctx (1, 1); // Create two sockets. One for receiving messages from 'propmt' // applications, one for sending messages to 'display' applications - zs::socket_t in_socket (ctx, ZS_SUB); + zmq::socket_t in_socket (ctx, ZMQ_SUB); in_socket.bind (in_interface); - zs::socket_t out_socket (ctx, ZS_PUB); + zmq::socket_t out_socket (ctx, ZMQ_PUB); out_socket.bind (out_interface); while (true) { // Get a message - zs::message_t in_message; + zmq::message_t in_message; in_socket.recv (&in_message); // Get the current time. Replace the newline character at the end @@ -62,7 +62,7 @@ int main (int argc, const char *argv []) timebuf [strlen (timebuf) - 1] = ' '; // Create and fill in the message - zs::message_t out_message (strlen (timebuf) + in_message.size ()); + zmq::message_t out_message (strlen (timebuf) + in_message.size ()); char *data = (char*) out_message.data (); memcpy (data, timebuf, strlen (timebuf)); data += strlen (timebuf); |