zmqpp 4.1.2
C++ bindings for 0mq (libzmq)
Loading...
Searching...
No Matches
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
17namespace 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
49namespace std
50{
54 ZMQPP_EXPORT ostream &operator<<(ostream &s, const zmqpp::signal &sig);
55}
#define ZMQPP_EXPORT
Definition compatibility.hpp:39
STL namespace.
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
C++ wrapper around zmq.
Definition actor.cpp:30
signal
Signal is a 8 bytes integer.
Definition signal.hpp:25
@ header
Only 7 bytes matter here.
@ ok
Indicates a success.
@ ko
Indicates an error.
@ stop
Indicates a request to stop.