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

📄 client_group.cpp

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 CPP
字号:
/**
 * @file Client_Group.cpp
 *
 * Client_Group.cpp,v 1.5 2002/03/13 19:58:37 coryan Exp
 *
 * @author Carlos O'Ryan <coryan@uci.edu>
 */

#include "Client_Group.h"
#include "Auto_Disconnect.h"

#if !defined(__ACE_INLINE__)
#include "Client_Group.inl"
#endif /* __ACE_INLINE__ */

ACE_RCSID(TAO_PERF_RTEC, Client_Group, "Client_Group.cpp,v 1.5 2002/03/13 19:58:37 coryan Exp")

void
Client_Group::init (CORBA::Long experiment_id,
                    CORBA::Long base_event_type,
                    CORBA::ULong iterations,
                    CORBA::Long workload_in_usecs,
                    ACE_UINT32 gsf,
                    PortableServer::POA_ptr supplier_poa,
                    PortableServer::POA_ptr consumer_poa)
{
  this->init (experiment_id, base_event_type, 1,
              iterations, workload_in_usecs, gsf,
              supplier_poa, consumer_poa);
}

void
Client_Group::init (CORBA::Long experiment_id,
                    CORBA::Long base_event_type,
                    CORBA::Long event_type_range,
                    CORBA::ULong iterations,
                    CORBA::Long workload_in_usecs,
                    ACE_UINT32 gsf,
                    PortableServer::POA_ptr supplier_poa,
                    PortableServer::POA_ptr consumer_poa)
{
  this->client_pair_.init (experiment_id,
                           base_event_type,
                           event_type_range,
                           iterations,
                           workload_in_usecs,
                           gsf,
                           supplier_poa,
                           consumer_poa);
  this->loopback_pair_.init (experiment_id, base_event_type,
                             supplier_poa, consumer_poa);
}

void
Client_Group::connect (RtecEventChannelAdmin::EventChannel_ptr ec
                       ACE_ENV_ARG_DECL)
{
  this->client_pair_.connect (ec ACE_ENV_ARG_PARAMETER);
  Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_);

  this->loopback_pair_.connect (ec ACE_ENV_ARG_PARAMETER);
  ACE_CHECK;
  Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_);

  loopback_pair_disconnect.release ();
  client_pair_disconnect.release ();
}

void
Client_Group::disconnect (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
  Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_);
  Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_);
}

⌨️ 快捷键说明

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