~registry/scalestack/trunk

« back to all changes in this revision

Viewing changes to scalestack/network/local/stream/listener_service.h

  • Committer: Eric Day
  • Date: 2010-12-04 17:17:34 UTC
  • mfrom: (56.1.9)
  • Revision ID: git-v1:9c392b034d652023a4b28ae2976aca128bb856c2
Merged Eric's branch with style updates, config file support, and other cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include <string>
20
20
 
21
 
#include <scalestack/event/handler_service.h>
 
21
#include <scalestack/network/listener_service.h>
22
22
#include <scalestack/network/local/common.h>
23
23
 
24
24
namespace scalestack
42
42
SCALESTACK_API
43
43
void listener_options(kernel::module& module, const char* port);
44
44
 
45
 
class SCALESTACK_API listener_service: public event::handler_service,
46
 
                                       public network::local::common
 
45
class SCALESTACK_API listener_service: public network::listener_service,
 
46
                                       public local::common
47
47
{
48
48
public:
49
49
 
50
50
  listener_service(kernel::module& module,
51
 
                   connection_service& associated_connection_service);
 
51
                   connection_service& connection_service);
52
52
 
53
53
  ~listener_service();
54
54
 
 
55
  /**
 
56
   * See network::listener_service::add_accepted().
 
57
   */
 
58
  network::stream* add_accepted(int file_descriptor,
 
59
                                struct sockaddr& peer,
 
60
                                socklen_t peer_size);
 
61
 
55
62
private:
56
63
 
57
64
  /**
70
77
   * Add listeners for the host/port pair.
71
78
   */
72
79
  SCALESTACK_LOCAL
73
 
  void _add_listener(connection_service& associated_connection_service,
74
 
                     std::string local_socket);
 
80
  void _add_listener(std::string local_socket);
75
81
 
76
82
  /**
77
83
   * See event::service::remove_handler().
78
84
   */
79
85
  SCALESTACK_LOCAL
80
86
  void remove_handler(event::handler* handler);
 
87
 
 
88
  connection_service& _connection_service;
81
89
};
82
90
 
83
91
} /* namespace stream */