File: Logging_Acceptor.h

package info (click to toggle)
ace 6.0.3%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,368 kB
  • sloc: cpp: 341,826; perl: 30,850; ansic: 20,952; makefile: 10,144; sh: 4,744; python: 828; exp: 787; yacc: 511; xml: 330; lex: 158; lisp: 116; csh: 48; tcl: 5
file content (58 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download | duplicates (2)
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
53
54
55
56
57
58
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    Logging_Acceptor.h
 *
 *  $Id: Logging_Acceptor.h 93639 2011-03-24 13:32:13Z johnnyw $
 *
 *  @author Doug Schmidt
 */
//=============================================================================


#ifndef _CLIENT_ACCEPTOR_H
#define _CLIENT_ACCEPTOR_H

#include "ace/SOCK_Acceptor.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ace/Event_Handler.h"

/**
 * @class Logging_Acceptor
 *
 * @brief Handle connection requests from remote client clients.
 *
 * Accepts client connection requests, creates Logging_Handler's
 * to process them, and registers these Handlers with the
 * ACE_Reactor Singleton.
 */
class Logging_Acceptor : public ACE_Event_Handler
{
friend class Logging_Handler;
public:
  /// Constructor.
  Logging_Acceptor (void);

  /// Initialization.
  int open (const ACE_INET_Addr &a);

private:
  // = Demuxing hooks.
  virtual int handle_input (ACE_HANDLE);
  virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
  virtual ACE_HANDLE get_handle (void) const;

  /// By making this private we ensure that the <Logging_Acceptor> is
  /// allocated dynamically.
  ~Logging_Acceptor (void);

  /// Passive connection acceptor factory.
  ACE_SOCK_Acceptor peer_acceptor_;
};

#endif /* _CLIENT_ACCEPTOR_H */