ZIO
Python and C++ interface to ZeroMQ and Zyre
interned.cpp
Go to the documentation of this file.
1 #include "zio/interned.hpp"
2 
3 
4 
5 
7 {
8  return sock.getsockopt<int>(ZMQ_TYPE);
9 }
10 
11 std::string zio::sock_type_name(int stype)
12 {
13  static const char* names[] = {
14  "PAIR",
15  "PUB",
16  "SUB",
17  "REQ",
18  "REP",
19  "DEALER",
20  "ROUTER",
21  "PULL",
22  "PUSH",
23  "XPUB",
24  "XSUB",
25  "STREAM",
26  "SERVER",
27  "CLIENT",
28  "RADIO",
29  "DISH",
30  "GATHER",
31  "SCATTER",
32  "DGRAM",
33  0
34  };
35  if (stype < 0 or stype > 11) return "";
36  return names[stype];
37 }
void getsockopt(int option_, void *optval_, size_t *optvallen_) const
Definition: zmq.hpp:1291
std::string sock_type_name(int stype)
Definition: interned.cpp:11
int sock_type(const socket_t &sock)
Return the ZeroMQ socket type number for the socket.
Definition: interned.cpp:6