31 #include <boost/enable_shared_from_this.hpp>
33 #include <boost/asio.hpp>
35 #include <rsc/logging/Logger.h>
36 #include <rsc/runtime/Printable.h>
38 #include "../../Event.h"
40 #include "../../protocol/Notification.h"
42 #include "rsb/rsbexports.h"
50 typedef boost::shared_ptr<Bus>
BusPtr;
72 class RSB_EXPORT
BusConnection :
public boost::enable_shared_from_this<BusConnection>,
73 public rsc::runtime::Printable {
75 typedef boost::shared_ptr<boost::asio::ip::tcp::socket>
SocketPtr;
80 bool tcpNoDelay =
false);
86 void startReceiving();
89 const std::string& wireSchema);
110 void performSafeCleanup(
const std::string& context);
114 void handleReadLength(
const boost::system::error_code& error,
115 size_t bytesTransferred);
117 void handleReadBody(
const boost::system::error_code& error,
118 size_t bytesTransferred,
121 void printContents(std::ostream& stream)
const;