本文整理汇总了C++中Endpoint::getQoS方法的典型用法代码示例。如果您正苦于以下问题:C++ Endpoint::getQoS方法的具体用法?C++ Endpoint::getQoS怎么用?C++ Endpoint::getQoS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Endpoint
的用法示例。
在下文中一共展示了Endpoint::getQoS方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ServiceException
void P3LeafMesh::createRemoteService(const SAPInfo* hint, const UUIDPtr& uuid, const UUIDPtr& sid, ServiceParamsPtr& params, UUIDPtr& iid) throw (ServiceException&) {
ACE_GUARD(ACE_SYNCH_RECURSIVE_MUTEX, ace_mon, m_lock);
if (hint == 0) {
throw ServiceException(ServiceException::SERVICE_WITHOUT_IMPL);
}
Endpoint endpoint;
ACE_Connector<P3MeshClientHandler, ACE_SOCK_Connector> connector;
hint->getFirstEndpoint(endpoint);
QoSEndpoint qosE = *(endpoint.getQoS());
UUIDPtr runtimeUUID;
getUUID(runtimeUUID);
UUIDPtr fid;
getFID(fid);
P3MeshClientHandler* clientHandler = new P3MeshClientHandler(
runtimeUUID,
fid,
qosE,
false, false, 0, 0, 0, 0);
if (connector.connect(clientHandler, endpoint.getAddr()) == -1) {
ACE_ERROR((LM_ERROR, ACE_TEXT("(%T)%@\n"),
ACE_TEXT("(%T)ERROR: P3Mesh::createRemoteService - connect failed:")));
clientHandler->close();
clientHandler = 0;
delete clientHandler;
} else {
ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%t|%T)INFO: P3LeafMesh::createRemoteService - Connect OK!\n")));
}
int ret = clientHandler->createService(params, iid);
clientHandler->close();
delete clientHandler;
if (ret == -1) {
ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%t|%T)INFO: P3LeafMesh::createRemoteService - failed to create, not enough resources\n")));
throw ServiceException(ServiceException::INSUFFICIENT_RESOURCES);
}
ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%t|%T)INFO: P3LeafMesh::createRemoteService - service created!\n")));
}