summaryrefslogtreecommitdiff
path: root/src/sub.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:01:47 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:01:47 +0900
commit4a7aad06d95701cf232198093ce396dcdbb53e5b (patch)
tree8ced8929e603a179d9434099244dfd782e705d5e /src/sub.cpp
parent1fc63e4dbcf1438eb571d720f57be68852f820f7 (diff)
ZeroMQ renamed to Crossroads
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/sub.cpp')
-rw-r--r--src/sub.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/sub.cpp b/src/sub.cpp
index ddd1321..ad55ea3 100644
--- a/src/sub.cpp
+++ b/src/sub.cpp
@@ -3,14 +3,14 @@
Copyright (c) 2007-2009 iMatix Corporation
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
- This file is part of 0MQ.
+ This file is part of Crossroads project.
- 0MQ is free software; you can redistribute it and/or modify it under
+ Crossroads is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
- 0MQ is distributed in the hope that it will be useful,
+ Crossroads is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
@@ -22,24 +22,24 @@
#include "sub.hpp"
#include "msg.hpp"
-zmq::sub_t::sub_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
+xs::sub_t::sub_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
xsub_t (parent_, tid_, sid_)
{
- options.type = ZMQ_SUB;
+ options.type = XS_SUB;
// Switch filtering messages on (as opposed to XSUB which where the
// filtering is off).
options.filter = true;
}
-zmq::sub_t::~sub_t ()
+xs::sub_t::~sub_t ()
{
}
-int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
+int xs::sub_t::xsetsockopt (int option_, const void *optval_,
size_t optvallen_)
{
- if (option_ != ZMQ_SUBSCRIBE && option_ != ZMQ_UNSUBSCRIBE) {
+ if (option_ != XS_SUBSCRIBE && option_ != XS_UNSUBSCRIBE) {
errno = EINVAL;
return -1;
}
@@ -49,9 +49,9 @@ int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
int rc = msg.init_size (optvallen_ + 1);
errno_assert (rc == 0);
unsigned char *data = (unsigned char*) msg.data ();
- if (option_ == ZMQ_SUBSCRIBE)
+ if (option_ == XS_SUBSCRIBE)
*data = 1;
- else if (option_ == ZMQ_UNSUBSCRIBE)
+ else if (option_ == XS_UNSUBSCRIBE)
*data = 0;
memcpy (data + 1, optval_, optvallen_);
@@ -67,20 +67,20 @@ int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
return rc;
}
-int zmq::sub_t::xsend (msg_t *msg_, int flags_)
+int xs::sub_t::xsend (msg_t *msg_, int flags_)
{
// Overload the XSUB's send.
errno = ENOTSUP;
return -1;
}
-bool zmq::sub_t::xhas_out ()
+bool xs::sub_t::xhas_out ()
{
// Overload the XSUB's send.
return false;
}
-zmq::sub_session_t::sub_session_t (io_thread_t *io_thread_, bool connect_,
+xs::sub_session_t::sub_session_t (io_thread_t *io_thread_, bool connect_,
socket_base_t *socket_, const options_t &options_,
const char *protocol_, const char *address_) :
xsub_session_t (io_thread_, connect_, socket_, options_, protocol_,
@@ -88,7 +88,7 @@ zmq::sub_session_t::sub_session_t (io_thread_t *io_thread_, bool connect_,
{
}
-zmq::sub_session_t::~sub_session_t ()
+xs::sub_session_t::~sub_session_t ()
{
}