#include <recipient.hh>
Definition at line 15 of file recipient.hh.
 
  
  
      
        
          | Recipient::Recipient  | 
          ( | 
          boost::asio::io_service &  | 
          service,  | 
         
        
           | 
           | 
          const boost::asio::ip::tcp::endpoint &  | 
          endpoint,  | 
         
        
           | 
           | 
          size_t  | 
          circbuff_size  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Definition at line 26 of file recipient.hh.
   38       LOG_ERROR << 
"Connection to " << m_endpoint << 
" failed";
 
boost::asio::ip::tcp::socket m_sock
 
boost::asio::ip::tcp::endpoint m_endpoint
 
 
 
 
  
  
      
        
          | Recipient::~Recipient  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | void Recipient::sock_reset  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | bool Recipient::sendIfPossible  | 
          ( | 
          const Frame &  | 
          data | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 51 of file recipient.hh.
const long heartbeat_interval
 
bool send(const Frame &data)
Send data. 
 
 
 
 
  
  
      
        
          | void Recipient::connect  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineprivate   | 
  
 
Definition at line 104 of file recipient.hh.
  106     boost::system::error_code ec;
 
  111       boost::asio::socket_base::send_buffer_size option(67108864);
 
  112       m_sock.set_option(option);
 
  113       boost::asio::socket_base::non_blocking_io command(
true);
 
  114       m_sock.io_control(command);
 
  116       boost::system::error_code ec;
 
  117       m_sock.shutdown(boost::asio::ip::tcp::socket::shutdown_receive, ec);
 
boost::asio::ip::tcp::socket m_sock
 
boost::asio::ip::tcp::endpoint m_endpoint
 
 
 
 
Definition at line 121 of file recipient.hh.
  123     boost::system::error_code ec;
 
  124     m_sock.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
 
boost::asio::ip::tcp::socket m_sock
 
 
 
 
  
  
      
        
          | bool Recipient::send  | 
          ( | 
          const Frame &  | 
          data | ) | 
           | 
         
       
   | 
  
inlineprivate   | 
  
 
Send data. 
- Parameters
 - 
  
  
 
- Returns
 - true if OK; else false 
 
Definition at line 133 of file recipient.hh.
  135     boost::system::error_code ec;
 
  140       if(ec.value()==11 && nsent<100){ 
 
  143               " gives EAGAIN: stop sending frame for the heartbeat interval in order to prevent strong RAM usage";
 
  144       }
else  if(ec.value()!=11)   
 
boost::asio::ip::tcp::socket m_sock
 
boost::asio::ip::tcp::endpoint m_endpoint
 
unsigned int getFrameLength() const 
 
bool write(const Vec &v, std::ostream &os)
Write a Vec(tor) to a stream. 
 
 
 
 
  
  
      
        
          | boost::asio::ip::tcp::socket Recipient::m_sock | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | boost::asio::ip::tcp::endpoint Recipient::m_endpoint | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | bool Recipient::m_connected | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | bool Recipient::link_active | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | long Recipient::heartbeat_c | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | const long Recipient::heartbeat_interval =5000 | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: