38 #include <boost/bind/bind.hpp>
47 return connection_manager;
51 : connection_id_counter_(0)
112 for(S_Connection::iterator itr = local_connections.begin();
113 itr != local_connections.end();
165 V_Connection::iterator conn_it = local_dropped.begin();
166 V_Connection::iterator conn_end = local_dropped.end();
167 for (;conn_it != conn_end; ++conn_it)
176 std::string client_uri =
"";
177 ROSCPP_LOG_DEBUG(
"UDPROS received a connection from [%s]", client_uri.c_str());
182 conn->initialize(transport,
true, NULL);
188 std::string client_uri = transport->getClientURI();
189 ROSCPP_LOG_DEBUG(
"TCPROS received a connection from [%s]", client_uri.c_str());
201 if (
header.getValue(
"topic", val))
203 ROSCPP_CONN_LOG_DEBUG(
"Connection: Creating TransportSubscriberLink for topic [%s] connected to [%s]",
204 val.c_str(), conn->getRemoteString().c_str());
207 sub_link->initialize(conn);
208 ret = sub_link->handleHeader(
header);
210 else if (
header.getValue(
"service", val))
212 ROSCPP_LOG_DEBUG(
"Connection: Creating ServiceClientLink for service [%s] connected to [%s]",
213 val.c_str(), conn->getRemoteString().c_str());
216 link->initialize(conn);
217 ret = link->handleHeader(
header);
221 ROSCPP_LOG_DEBUG(
"Got a connection for a type other than 'topic' or 'service' from [%s]. Fail.",
222 conn->getRemoteString().c_str());