rogue
Loading...
Searching...
No Matches
TcpClient.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::TcpClientPtr ris::TcpClient::create(std::string addr, uint16_t port) {
43 ris::TcpClientPtr r = std::make_shared<ris::TcpClient>(addr, port);
44 return (r);
45}
46
48ris::TcpClient::TcpClient(std::string addr, uint16_t port) : ris::TcpCore(addr, port, false) {}
49
51ris::TcpClient::~TcpClient() {}
52
53void ris::TcpClient::setup_python() {
54#ifndef NO_PYTHON
55
56 bp::class_<ris::TcpClient, ris::TcpClientPtr, bp::bases<ris::TcpCore>, boost::noncopyable>(
57 "TcpClient",
58 bp::init<std::string, uint16_t>());
59
60 bp::implicitly_convertible<ris::TcpClientPtr, ris::TcpCorePtr>();
61#endif
62}
Stream TCP bridge core implementation.
Definition TcpCore.h:51
std::shared_ptr< rogue::interfaces::stream::TcpClient > TcpClientPtr
Shared pointer alias for TcpClient.
Definition TcpClient.h:85