summaryrefslogtreecommitdiff
path: root/src/zmq.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-08-06 10:47:34 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-08-06 10:47:34 +0200
commitb8b4acef4c2ba1a169ce84c1fb4c70a5676ebba3 (patch)
treead29407ed2db35765fda969e297f7f0efd9ff39a /src/zmq.cpp
parent43fa72b7ee6b6d97b84a555ce8902cee855aeb72 (diff)
dispatcher renamed to context
Diffstat (limited to 'src/zmq.cpp')
-rw-r--r--src/zmq.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/zmq.cpp b/src/zmq.cpp
index a7fd486..0fb6fe1 100644
--- a/src/zmq.cpp
+++ b/src/zmq.cpp
@@ -25,7 +25,7 @@
#include "i_api.hpp"
#include "err.hpp"
-#include "dispatcher.hpp"
+#include "context.hpp"
#include "msg.hpp"
int zmq_msg_init (zmq_msg *msg_)
@@ -162,28 +162,27 @@ int zmq_msg_type (zmq_msg *msg_)
void *zmq_init (int app_threads_, int io_threads_)
{
- // There should be at least a single thread managed by the dispatcher.
+ // There should be at least a single thread managed by the context.
if (app_threads_ < 0 || io_threads_ < 0 ||
app_threads_ + io_threads_ == 0) {
errno = EINVAL;
return NULL;
}
- zmq::dispatcher_t *dispatcher =
- new zmq::dispatcher_t (app_threads_, io_threads_);
- zmq_assert (dispatcher);
- return (void*) dispatcher;
+ zmq::context_t *context = new zmq::context_t (app_threads_, io_threads_);
+ zmq_assert (context);
+ return (void*) context;
}
int zmq_term (void *context_)
{
- ((zmq::dispatcher_t*) context_)->shutdown ();
+ ((zmq::context_t*) context_)->shutdown ();
return 0;
}
void *zmq_socket (void *context_, int type_)
{
- return (void*) (((zmq::dispatcher_t*) context_)->create_socket (type_));
+ return (void*) (((zmq::context_t*) context_)->create_socket (type_));
}
int zmq_close (void *s_)