rogue
Loading...
Searching...
No Matches
TcpServer.cpp
Go to the documentation of this file.
1
17#include "rogue/Directives.h"
18
20
21#include <zmq.h>
22
23#include <memory>
24#include <string>
25
26#include "rogue/GeneralError.h"
27#include "rogue/GilRelease.h"
28#include "rogue/Logging.h"
33
35
36#ifndef NO_PYTHON
37 #include <boost/python.hpp>
38namespace bp = boost::python;
39#endif
40
42ris::TcpServerPtr ris::TcpServer::create(std::string addr, uint16_t port) {
43 ris::TcpServerPtr r = std::make_shared<ris::TcpServer>(addr, port);
44 return (r);
45}
46
48ris::TcpServer::TcpServer(std::string addr, uint16_t port) : ris::TcpCore(addr, port, true) {}
49
51ris::TcpServer::~TcpServer() {}
52
53void ris::TcpServer::setup_python() {
54#ifndef NO_PYTHON
55
56 bp::class_<ris::TcpServer, ris::TcpServerPtr, bp::bases<ris::TcpCore>, boost::noncopyable>(
57 "TcpServer",
58 bp::init<std::string, uint16_t>());
59
60 bp::implicitly_convertible<ris::TcpServerPtr, ris::TcpCorePtr>();
61#endif
62}
Stream TCP bridge core implementation.
Definition TcpCore.h:51
std::shared_ptr< rogue::interfaces::stream::TcpServer > TcpServerPtr
Alias for using shared pointer as TcpServerPtr.
Definition TcpServer.h:86