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

📄 basic.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
字号:
/* -*- C++ -*- */
// Basic.h,v 1.3 2002/01/29 20:20:46 okellogg Exp

// ============================================================================
//
// = FILENAME
//   Basic.h
//
// = AUTHOR
//   Pradeep Gore <pradeep@cs.wustl.edu>
//
// = DESCRIPTION
//   This is a simple test class for the standard Cos Event Channel.
//
// ============================================================================

#ifndef COSECBASIC_H
#define COSECBASIC_H

#include "Consumer.h"
#include "Supplier.h"

class Basic
{
  // = TITLE
  //   class Basic
  //
  // = DESCRIPTION
  //   Creates a CORBA Standard Event Channel (COSEC) implemented with
  //   TAO's Real-time Event Channel (RtEC) and sends an event across.
public:
  // = Initialization and termination methods.
  Basic (void);
  // Constructor.

  ~Basic (void);
  // Destructor.

  void init (int argc, char *argv[] ACE_ENV_ARG_DECL);
  // Starts up an ORB and the CosEC.
  // Returns 0 on success, -1 on error.

  void run (ACE_ENV_SINGLE_ARG_DECL);
  // Connects a consumer and a supplier to the CosEC and sends 1 event
  // across.

  void shutdown (ACE_ENV_SINGLE_ARG_DECL);
  // Closes down the CosEC.

private:
  void init_ORB (int argc, char *argv[] ACE_ENV_ARG_DECL);
  // initializes the ORB.
  // Returns 0 on success, -1 on error.

  void init_CosEC (ACE_ENV_SINGLE_ARG_DECL);
  // initializes the COS EC.
  // Returns 0 on success, -1 on error.

  CORBA::ORB_var orb_;
  // The ORB that we use.

  PortableServer::POA_var root_poa_;
  // The root poa.

  CosEventChannelAdmin::EventChannel_var cos_ec_;
  // Reference to the CosEC returned after activating it in the ORB.

  Consumer consumer_;
  // The Cos Consumer that will receive the event.

  Supplier supplier_;
  // The Cos Supplier that will supply the event.
};

#endif /* COSECBASIC_H */

⌨️ 快捷键说明

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