#include <recipient.hh>
Definition at line 15 of file recipient.hh.
◆ Recipient()
Recipient::Recipient |
( |
boost::asio::io_service & | service, |
|
|
const boost::asio::ip::tcp::endpoint & | endpoint, |
|
|
size_t | circbuff_size ) |
|
inline |
Definition at line 24 of file recipient.hh.
27 :
32 {
37 }
38 }
boost::asio::ip::tcp::endpoint m_endpoint
boost::asio::ip::tcp::socket m_sock
◆ ~Recipient()
Recipient::~Recipient |
( |
| ) |
|
|
inline |
◆ sock_reset()
void Recipient::sock_reset |
( |
| ) |
|
|
inline |
◆ sendIfPossible()
bool Recipient::sendIfPossible |
( |
const Frame & | data | ) |
|
|
inline |
Definition at line 46 of file recipient.hh.
47 {
48
50 {
52
54 {
56 return false;
57 }
58 }
59
61 {
63 {
65 }
66 else
67 {
68 break;
69 }
70 }
72 {
74 }
75
77 }
bool send(const Frame &data)
Send data.
◆ connect()
void Recipient::connect |
( |
| ) |
|
|
inlineprivate |
Definition at line 88 of file recipient.hh.
89 {
90 boost::system::error_code ec;
93
95#if __APPLE__
96 boost::asio::socket_base::send_buffer_size option(6108864);
97#else
98 boost::asio::socket_base::send_buffer_size option(67108864);
99#endif
100 m_sock.set_option(option);
102 boost::system::error_code ec;
103 m_sock.shutdown(boost::asio::ip::tcp::socket::shutdown_receive, ec);
104 }
105 }
◆ stop()
Definition at line 107 of file recipient.hh.
108 {
109 boost::system::error_code ec;
110 m_sock.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
112 }
◆ send()
bool Recipient::send |
( |
const Frame & | data | ) |
|
|
inlineprivate |
Send data.
- Parameters
-
- Returns
- true if OK; else false
Definition at line 119 of file recipient.hh.
120 {
121 boost::system::error_code ec;
122 boost::asio::write(
m_sock, boost::asio::buffer(
data.data(),
data.getFrameLength()), ec);
124
125 if (ec) {
127 }
129 }
◆ RecipientsHandler
◆ m_sock
boost::asio::ip::tcp::socket Recipient::m_sock |
|
private |
◆ m_endpoint
boost::asio::ip::tcp::endpoint Recipient::m_endpoint |
|
private |
◆ m_cbuffer
◆ m_connected
bool Recipient::m_connected |
|
private |
The documentation for this class was generated from the following file: