本文整理汇总了C++中TAO_ServerRequest::request_service_context方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_ServerRequest::request_service_context方法的具体用法?C++ TAO_ServerRequest::request_service_context怎么用?C++ TAO_ServerRequest::request_service_context使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAO_ServerRequest
的用法示例。
在下文中一共展示了TAO_ServerRequest::request_service_context方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
TAO_DiffServ_Network_Priority_Hook::set_dscp_codepoint (
TAO_ServerRequest &req, TAO_Root_POA &poa)
{
CORBA::Long dscp_codepoint = 0;
TAO_Service_Context &request_service_context =
req.request_service_context ();
TAO_Network_Priority_Protocols_Hooks *nph =
poa.orb_core ().get_network_priority_protocols_hooks ();
TAO::Portable_Server::Cached_Policies::NetworkPriorityModel npm =
poa.cached_policies ().network_priority_model ();
if (npm == TAO::Portable_Server::Cached_Policies::
CLIENT_PROPAGATED_NETWORK_PRIORITY)
{
if (nph != 0)
{
dscp_codepoint = nph->get_dscp_codepoint (request_service_context);
}
}
else if (npm == TAO::Portable_Server::Cached_Policies::
SERVER_DECLARED_NETWORK_PRIORITY)
{
dscp_codepoint = poa.cached_policies ().reply_diffserv_codepoint ();
}
TAO_Connection_Handler *connection_handler =
req.transport ()->connection_handler ();
connection_handler->set_dscp_codepoint (dscp_codepoint);
}