libzmq
src
i_engine.hpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: MPL-2.0 */
2
3
#ifndef __ZMQ_I_ENGINE_HPP_INCLUDED__
4
#define __ZMQ_I_ENGINE_HPP_INCLUDED__
5
6
#include "
endpoint.hpp
"
7
#include "
macros.hpp
"
8
9
namespace
zmq
10
{
11
class
io_thread_t;
12
13
// Abstract interface to be implemented by various engines.
14
15
struct
i_engine
16
{
17
enum
error_reason_t
18
{
19
protocol_error
,
20
connection_error
,
21
timeout_error
22
};
23
24
virtual
~i_engine
()
ZMQ_DEFAULT
;
25
26
// Indicate if the engine has an handshake stage.
27
// If engine has handshake stage, engine must call session.engine_ready when the handshake is complete.
28
virtual
bool
has_handshake_stage
() = 0;
29
30
// Plug the engine to the session.
31
virtual
void
plug
(
zmq
::io_thread_t *io_thread_,
32
class
session_base_t
*session_) = 0;
33
34
// Terminate and deallocate the engine. Note that 'detached'
35
// events are not fired on termination.
36
virtual
void
terminate
() = 0;
37
38
// This method is called by the session to signalise that more
39
// messages can be written to the pipe.
40
// Returns false if the engine was deleted due to an error.
41
// TODO it is probably better to change the design such that the engine
42
// does not delete itself
43
virtual
bool
restart_input
() = 0;
44
45
// This method is called by the session to signalise that there
46
// are messages to send available.
47
virtual
void
restart_output
() = 0;
48
49
virtual
void
zap_msg_available
() = 0;
50
51
virtual
const
endpoint_uri_pair_t
&
get_endpoint
()
const
= 0;
52
};
53
}
54
55
#endif
zmq::session_base_t
Definition:
session_base.hpp:21
zmq::i_engine::~i_engine
virtual ~i_engine() ZMQ_DEFAULT
benchmarks.python.py_benchmark.const
const
Definition:
py_benchmark.py:14
zmq::i_engine::timeout_error
@ timeout_error
Definition:
i_engine.hpp:21
zmq::i_engine::error_reason_t
error_reason_t
Definition:
i_engine.hpp:17
ZMQ_DEFAULT
#define ZMQ_DEFAULT
Definition:
macros.hpp:43
zmq::i_engine::restart_input
virtual bool restart_input()=0
zmq
Definition:
zmq.hpp:229
macros.hpp
zmq::endpoint_uri_pair_t
Definition:
endpoint.hpp:17
endpoint.hpp
zmq::i_engine::connection_error
@ connection_error
Definition:
i_engine.hpp:20
zmq::i_engine::get_endpoint
virtual const endpoint_uri_pair_t & get_endpoint() const =0
zmq::i_engine::has_handshake_stage
virtual bool has_handshake_stage()=0
zmq::i_engine::protocol_error
@ protocol_error
Definition:
i_engine.hpp:19
zmq::i_engine::zap_msg_available
virtual void zap_msg_available()=0
zmq::i_engine::restart_output
virtual void restart_output()=0
zmq::i_engine::terminate
virtual void terminate()=0
zmq::i_engine::plug
virtual void plug(zmq::io_thread_t *io_thread_, class session_base_t *session_)=0
zmq::i_engine
Definition:
i_engine.hpp:15
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:54