summaryrefslogtreecommitdiff
path: root/src/zmq.cpp
diff options
context:
space:
mode:
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_)