51 #include <boost/bind/bind.hpp>
60 , retry_timer_handle_(-1)
99 header[
"topic"] = parent->getName();
100 header[
"md5sum"] = parent->md5sum();
102 header[
"type"] = parent->datatype();
121 parent->removePublisherLink(shared_from_this());
173 uint32_t len = *((uint32_t*)buffer.get());
175 if (len > 1000000000)
177 ROS_ERROR(
"a message of over a gigabyte was " \
178 "predicted in tcpros. that seems highly " \
179 "unlikely, so I'll assume protocol " \
180 "synchronization is lost.");
190 if (!success && !conn)
200 if (success || !
connection_->getTransport()->requiresHeader())
222 if (
connection_->getTransport()->getType() == std::string(
"TCPROS"))
224 std::string topic = parent ? parent->getName() :
"unknown";
228 const std::string& host = old_transport->getConnectedHost();
229 int port = old_transport->getConnectedPort();
231 ROSCPP_CONN_LOG_DEBUG(
"Retrying connection to [%s:%d] for topic [%s]", host.c_str(), port, topic.c_str());
234 if (transport->connect(host, port))
245 ROSCPP_CONN_LOG_DEBUG(
"connect() failed when retrying connection to [%s:%d] for topic [%s]", host.c_str(), port, topic.c_str());
250 parent->removePublisherLink(shared_from_this());
271 std::string topic = parent ? parent->getName() :
"unknown";
287 shared_from_this(),
false);
320 return connection_->getTransport()->getTransportInfo();