62 return server_link_ && server_link_->isValid();
77 bool ServiceClient::init(
const std::string& service_name,
const std::string& service_md5sum, std::string host, uint32_t port,
const M_string& header_values)
82 impl_->name_ = service_name;
84 if (host.empty() || port == 0) {
91 if (!transport->connect(host, port))
return false;
95 impl_->server_link_.reset(
new ServiceServerLink(service_name,
true, service_md5sum, service_md5sum, header_values));
97 impl_->server_link_->initialize(connection);
99 return impl_->isValid();
105 return impl_->server_link_->call(req, resp);
bool call(MReq &req, MRes &res)
boost::function< bool(const ConnectionPtr &, const Header &)> HeaderReceivedFunc
static const ServiceManagerPtr & instance()
std::map< std::string, std::string > M_string
static const ConnectionManagerPtr & instance()
static const PollManagerPtr & instance()
ROSCPP_DECL void shutdown()
ROSCPP_DECL bool waitForService(const std::string &service_name, int32_t timeout)