summaryrefslogtreecommitdiff
path: root/ACE/apps/drwho/CM_Client.h
blob: bd868fc8e0925fba69034139a67b2f06dc374328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    CM_Client.h
 *
 *  $Id$
 *
 *  Provides a virtual communcations layer for the client in the
 *  drwho program.
 *
 *
 *  @author Douglas C. Schmidt
 */
//=============================================================================


#ifndef _CM_CLIENT_H
#define _CM_CLIENT_H

#include "Comm_Manager.h"
#include "ace/Time_Value.h"

/**
 * @class CM_Client
 *
 * @brief Provides a virtual communcations layer for the client in the
 * drwho program.
 */
class CM_Client : public Comm_Manager
{
public:
  // = Initialization and termination.
  /// Constructor.
  CM_Client (void);

  /// Destructor.
  virtual ~CM_Client (void);

  virtual int mux (char *packet, int &packet_length)   = 0;
  virtual int demux (char *packet, int &packet_length) = 0;
  virtual int open (short port_number);
  virtual int receive (int timeout = 0);
  virtual int send (void);

private:
  fd_set read_fd_;
  ACE_Time_Value time_out_;
  ACE_Time_Value *top_;
};

#endif /* _CM_CLIENT_H */