Skip to content

Commit

Permalink
Merge pull request zeromq#223 from kurdybacha/server-client
Browse files Browse the repository at this point in the history
Problem: client/server socket types not defined.
  • Loading branch information
sigiesec authored May 11, 2018
2 parents 2aba0bb + 33025bf commit e972f39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/poller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ struct server_client_setup
};

zmq::context_t context;
zmq::socket_t server {context, zmq::socket_type::router};
zmq::socket_t client {context, zmq::socket_type::dealer};
zmq::socket_t server {context, zmq::socket_type::server};
zmq::socket_t client {context, zmq::socket_type::client};
std::string endpoint;
short events = 0;
};
Expand Down Expand Up @@ -222,7 +222,6 @@ TEST(poller, client_server)
zmq::poller_t::handler_t handler = [&](short e) {
if (0 != (e & ZMQ_POLLIN)) {
zmq::message_t zmq_msg;
ASSERT_NO_THROW(s.server.recv(&zmq_msg)); // skip msg id
ASSERT_NO_THROW(s.server.recv(&zmq_msg)); // get message
std::string recv_msg(zmq_msg.data<char>(),
zmq_msg.size());
Expand Down
4 changes: 4 additions & 0 deletions zmq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ namespace zmq
xsub = ZMQ_XSUB,
push = ZMQ_PUSH,
pull = ZMQ_PULL,
#ifdef ZMQ_BUILD_DRAFT_API
server = ZMQ_SERVER,
client = ZMQ_CLIENT,
#endif
#if ZMQ_VERSION_MAJOR >= 4
stream = ZMQ_STREAM,
#endif
Expand Down

0 comments on commit e972f39

Please sign in to comment.