zmqpp  4.1.2
C++ bindings for 0mq (libzmq)
signal.hpp
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * This file is part of zmqpp.
7  * Copyright (c) 2011-2015 Contributors as noted in the AUTHORS file.
8  */
9 
10 #pragma once
11 
12 #include <cstdint>
13 #include <iostream>
14 
15 #include "compatibility.hpp"
16 
17 namespace zmqpp
18 {
19 
24  ZMQPP_COMPARABLE_ENUM signal : int64_t
25  {
29  header = 0x0077665544332211L,
33  ok = (header << 8) | 0x00,
37  ko = (header << 8) | 0x01,
41  stop = (header << 8) | 0x02,
42 
43  test = (header << 8) | 0xFF
44  };
45 
46 }
47 
48 
49 namespace std
50 {
54  ZMQPP_EXPORT ostream &operator<<(ostream &s, const zmqpp::signal &sig);
55 }
Only 7 bytes matter here.
C++ wrapper around zmq.
Definition: actor.cpp:29
STL namespace.
Indicates a success.
Indicates an error.
#define ZMQPP_EXPORT
Definition: compatibility.hpp:39
signal
Signal is a 8 bytes integer.
Definition: signal.hpp:24
ostream & operator<<(ostream &s, const zmqpp::signal &sig)
Write the value of the signal to the stream without removing the signal header.
Definition: signal.cpp:15
Indicates a request to stop.