curve_client.hpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MPL-2.0 */
2 
3 #ifndef __ZMQ_CURVE_CLIENT_HPP_INCLUDED__
4 #define __ZMQ_CURVE_CLIENT_HPP_INCLUDED__
5 
6 #ifdef ZMQ_HAVE_CURVE
7 
9 #include "options.hpp"
10 #include "curve_client_tools.hpp"
11 
12 namespace zmq
13 {
14 class msg_t;
15 class session_base_t;
16 
17 class curve_client_t ZMQ_FINAL : public curve_mechanism_base_t
18 {
19  public:
20  curve_client_t (session_base_t *session_,
21  const options_t &options_,
22  const bool downgrade_sub_);
23  ~curve_client_t () ZMQ_FINAL;
24 
25  // mechanism implementation
26  int next_handshake_command (msg_t *msg_) ZMQ_FINAL;
27  int process_handshake_command (msg_t *msg_) ZMQ_FINAL;
28  int encode (msg_t *msg_) ZMQ_FINAL;
29  int decode (msg_t *msg_) ZMQ_FINAL;
30  status_t status () const ZMQ_FINAL;
31 
32  private:
33  enum state_t
34  {
35  send_hello,
36  expect_welcome,
37  send_initiate,
38  expect_ready,
39  error_received,
40  connected
41  };
42 
43  // Current FSM state
44  state_t _state;
45 
46  // CURVE protocol tools
47  curve_client_tools_t _tools;
48 
49  int produce_hello (msg_t *msg_);
50  int process_welcome (const uint8_t *msg_data_, size_t msg_size_);
51  int produce_initiate (msg_t *msg_);
52  int process_ready (const uint8_t *msg_data_, size_t msg_size_);
53  int process_error (const uint8_t *msg_data_, size_t msg_size_);
54 };
55 }
56 
57 #endif
58 
59 #endif
curve_client_tools.hpp
benchmarks.python.py_benchmark.const
const
Definition: py_benchmark.py:14
curve_mechanism_base.hpp
zmq
Definition: zmq.hpp:229
options.hpp
ZMQ_FINAL
Definition: unittest_ip_resolver.cpp:26
options_
DebugStringOptions options_
Definition: src/google/protobuf/descriptor.cc:2410


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:49