rogue
Loading...
Searching...
No Matches
TcpServer.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_INTERFACES_MEMORY_TCP_SERVER_H__
18#define __ROGUE_INTERFACES_MEMORY_TCP_SERVER_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24#include <string>
25#include <thread>
26
27#include "rogue/Logging.h"
29
30namespace rogue {
31namespace interfaces {
32namespace memory {
33
53 // Inbound Address
54 std::string reqAddr_;
55
56 // Outbound Address
57 std::string respAddr_;
58
59 // Zeromq Context
60 void* zmqCtx_;
61
62 // Zeromq inbound port
63 void* zmqReq_;
64
65 // Zeromq outbound port
66 void* zmqResp_;
67
68 // Thread background
69 void runThread();
70
71 // Log
72 std::shared_ptr<rogue::Logging> bridgeLog_;
73
74 // Thread
75 std::thread* thread_;
76 bool threadEn_;
77
78 public:
96 static std::shared_ptr<rogue::interfaces::memory::TcpServer> create(std::string addr, uint16_t port);
97
101 static void setup_python();
102
117 TcpServer(std::string addr, uint16_t port);
118
122 ~TcpServer();
123
129 void close();
130
134 void stop();
135
144 void start();
145};
146
150typedef std::shared_ptr<rogue::interfaces::memory::TcpServer> TcpServerPtr;
151
152} // namespace memory
153} // namespace interfaces
154}; // namespace rogue
155
156#endif
Master endpoint for memory transactions.
Definition Master.h:50
static std::shared_ptr< rogue::interfaces::memory::Master > create()
Creates a memory master instance.
Definition Master.cpp:44
Memory TCP bridge server.
Definition TcpServer.h:52
void stop()
Stops the bridge interface and worker thread.
void close()
Closes bridge connections.
void start()
Managed-lifecycle startup hook.
static void setup_python()
Registers this type with Python bindings.
~TcpServer()
Destroys the TCP server and releases transport resources.
std::shared_ptr< rogue::interfaces::memory::TcpServer > TcpServerPtr
Shared pointer alias for TcpServer.
Definition TcpServer.h:150