Free Electron
ZeroConnection_czmq.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __zeromq_ZeroConnection_h__
8 #define __zeromq_ZeroConnection_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Simple ZeroMQ Connection
17 
18  @ingroup zeromq
19 *//***************************************************************************/
20 class FE_DL_EXPORT ZeroConnection:
21  public ConnectionI,
22  public Initialize<ZeroConnection>
23 {
24  public:
25 
26  ZeroConnection(void);
27 virtual ~ZeroConnection(void);
28 
29  void initialize(void);
30 
31 virtual Result connect(String a_address,short a_port);
32 
33 virtual Result send(String a_message);
34 virtual Result receive(String& a_rMessage);
35 
36  private:
37  Result disconnect(void);
38 
39  BWORD m_isServer;
40  BWORD m_connected;
41  String m_endpoint;
42  zsock_t* m_pSocket;
43  zframe_t* m_pMsgID;
44 };
45 
46 } /* namespace ext */
47 } /* namespace fe */
48 
49 #endif /* __zeromq_ZeroConnection_h__ */
kernel
Definition: namespace.dox:3
Result
Generalized return value indicating success or failure, and why.
Definition: Result.h:24