Free Electron
ZeroConnection.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 
43  void* m_pContext;
44  void* m_pSocket;
45  U8 m_identity[5];
46 };
47 
48 } /* namespace ext */
49 } /* namespace fe */
50 
51 #endif /* __zeromq_ZeroConnection_h__ */
Simple ZeroMQ Connection.
Definition: ZeroConnection.h:20
Simple Network Connection.
Definition: enet/ConnectionI.h:8
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Automatically reference-counted string container.
Definition: String.h:128
Result
Generalized return value indicating success or failure, and why.
Definition: Result.h:24