![]() |
libzmq master
The Intelligent Transport Layer
|
00001 /* 00002 Copyright (c) 2009-2011 250bpm s.r.o. 00003 Copyright (c) 2007-2009 iMatix Corporation 00004 Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file 00005 00006 This file is part of 0MQ. 00007 00008 0MQ is free software; you can redistribute it and/or modify it under 00009 the terms of the GNU Lesser General Public License as published by 00010 the Free Software Foundation; either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 0MQ is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public License 00019 along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 #include "pub.hpp" 00023 #include "msg.hpp" 00024 00025 zmq::pub_t::pub_t (class ctx_t *parent_, uint32_t tid_) : 00026 xpub_t (parent_, tid_) 00027 { 00028 options.type = ZMQ_PUB; 00029 } 00030 00031 zmq::pub_t::~pub_t () 00032 { 00033 } 00034 00035 int zmq::pub_t::xrecv (class msg_t *msg_, int flags_) 00036 { 00037 // Messages cannot be received from PUB socket. 00038 errno = ENOTSUP; 00039 return -1; 00040 } 00041 00042 bool zmq::pub_t::xhas_in () 00043 { 00044 return false; 00045 } 00046 00047 zmq::pub_session_t::pub_session_t (io_thread_t *io_thread_, bool connect_, 00048 socket_base_t *socket_, const options_t &options_, 00049 const char *protocol_, const char *address_) : 00050 xpub_session_t (io_thread_, connect_, socket_, options_, protocol_, 00051 address_) 00052 { 00053 } 00054 00055 zmq::pub_session_t::~pub_session_t () 00056 { 00057 } 00058