client_task.h

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C头文件 代码 · 共 67 行

H
67
字号
// -*- C++ -*-

// =========================================================================
/**
 *  @file  Client_Task.h
 *
 *  Client_Task.h,v 1.1 2002/10/18 01:52:49 mayur Exp
 *
 *  @desc  Provides common functionality needed to run a client
 *  thread. Also incorporates functionality to collect and print
 *  statistics about the test.
 *
 *  @author Mayur Deshpande <mayur@ics.uci.edu>
 *
 */
// =========================================================================


#ifndef MT_CLIENT_TASK_H
#define MT_CLIENT_TASK_H

#include "ace/Task.h"
#include "ace/Basic_Stats.h"

#include "TestC.h"


// Helper class for common client functionalities
class Client_Task : public ACE_Task_Base
{
public:
  /// Constructor
  Client_Task (int &argc, char ** argv);

  int parse_args (void);

  void try_RT_scheduling (void);

  int narrow_servant (void);

  int run_test (void);

protected:
  /// The service method
  virtual int svc (void);

private:
  /// Print Statistics
  void accumulate_and_dump (ACE_Basic_Stats &totals,
                            const char *msg,
                            ACE_UINT32 gsf);

private:
  /// The object reference used for this test
  Test::Roundtrip_var roundtrip_;

  /// Keep track of the latency (minimum, average, maximum and jitter)
  ACE_Basic_Stats latency_;

  int &argc_;
  char **argv_;
  const char *ior_;
  int iterations_;
};

#endif // Client_Task_H

⌨️ 快捷键说明

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