void message_handler::read_body() {
  memset(read_msg_.data(), '\0', read_msg_.length());
  boost::asio::async_read(socket_,
      boost::asio::buffer(read_msg_.body(), read_msg_.body_length()),
      [this](boost::system::error_code ec, std::size_t /*length*/) {
        if (!ec) {
          delivery(read_msg_.body());
          read_header();
        } else {
            std::cout << "Error Reading messge body " << ec << std::endl;
            //TODO Update the remove handler from list at EOF of disconnect
            ob.update_observer(client_id);
        }
      }
  );
}
 explicit
 reader(message<isRequest,
         basic_dynamic_body, Fields> const& m)
     : body_(m.body())
 {
 }
 explicit
 writer(message<isRequest,
         basic_dynamic_body, Fields>& msg)
     : body_(msg.body())
 {
 }
Exemple #4
0
 explicit
 reader(message<isRequest,
         vector_body, Fields>& m)
     : body_(m.body())
 {
 }
Exemple #5
0
 explicit
 writer(message<isRequest,
         vector_body, Fields> const& msg)
     : body_(msg.body())
 {
 }