⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fill_ace_qos.cpp

📁 ace开发环境 用来开发网络程序 其运用了设计模式、多平台、C++等多种知识
💻 CPP
字号:
// Fill_ACE_QoS.cpp// $Id: Fill_ACE_QoS.cpp 72205 2006-04-20 10:20:34Z jwillemsen $#include "Fill_ACE_QoS.h"ACE_RCSID(QOS, Fill_ACE_QoS,"$Id: Fill_ACE_QoS.cpp 72205 2006-04-20 10:20:34Z jwillemsen $")const iovec Fill_ACE_QoS::iov_ = {0,0};Fill_ACE_QoS::Fill_ACE_QoS (void){  ACE_NEW (this->default_traffic_,           ACE_Flow_Spec  (ACE_QOS_NOT_SPECIFIED,                           ACE_QOS_NOT_SPECIFIED,                           ACE_QOS_NOT_SPECIFIED,                           ACE_QOS_NOT_SPECIFIED,                           ACE_QOS_NOT_SPECIFIED,                           ACE_SERVICETYPE_NOTRAFFIC,                           ACE_QOS_NOT_SPECIFIED,                           ACE_QOS_NOT_SPECIFIED,                           25,                           1));}// destructor.Fill_ACE_QoS::~Fill_ACE_QoS (void){}intFill_ACE_QoS::fill_simplex_receiver_qos (ACE_QoS &ace_qos,                                         const ACE_CString &recv_flow_name){  ACE_Flow_Spec *recv_flow_spec = 0;  if (this->map ().find (recv_flow_name, recv_flow_spec) != 0)    ACE_ERROR_RETURN ((LM_DEBUG,                       "Unable to find a FlowSpec with name %s",                       recv_flow_name.c_str ()),                      -1);  ace_qos.receiving_flowspec (recv_flow_spec);  ace_qos.sending_flowspec ((this->default_traffic_));  ace_qos.provider_specific (Fill_ACE_QoS::iov_);  return 0;}intFill_ACE_QoS::fill_simplex_sender_qos (ACE_QoS &ace_qos,                                       const ACE_CString &send_flow_name){  ACE_Flow_Spec *send_flow_spec = 0;  if (this->map ().find (send_flow_name, send_flow_spec) != 0)    ACE_ERROR_RETURN ((LM_DEBUG,                       "Unable to find a FlowSpec with name %s",                       send_flow_name.c_str ()),                      -1);  ace_qos.receiving_flowspec ((this->default_traffic_));  ace_qos.sending_flowspec (send_flow_spec);  ace_qos.provider_specific (Fill_ACE_QoS::iov_);  return 0;}intFill_ACE_QoS::fill_duplex_qos (ACE_QoS &ace_qos,                               const ACE_CString &recv_flow_name,                               const ACE_CString &send_flow_name){  ACE_Flow_Spec *send_flow_spec = 0;  ACE_Flow_Spec *recv_flow_spec = 0;  if (this->map ().find (recv_flow_name, recv_flow_spec) != 0)    ACE_ERROR_RETURN ((LM_DEBUG,                       "Unable to find a FlowSpec with name %s",                       recv_flow_name.c_str ()),                      -1);  if (this->map ().find (send_flow_name, send_flow_spec) != 0)    ACE_ERROR_RETURN ((LM_DEBUG,                       "Unable to find a FlowSpec with name %s",                       send_flow_name.c_str ()),                      -1);  ace_qos.receiving_flowspec (recv_flow_spec);  ace_qos.sending_flowspec (send_flow_spec);  ace_qos.provider_specific (Fill_ACE_QoS::iov_);  return 0;}Fill_ACE_QoS::FLOW_SPEC_HASH_MAP&Fill_ACE_QoS::map (void){  return this->flow_spec_map_;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -