summaryrefslogtreecommitdiff
path: root/apps/Gateway/Gateway/Connection_Handler_Acceptor.cpp
blob: f38aa21a23abed202a528875919506d1895d74ea (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
// $Id$

#include "Event_Channel.h"
#include "Connection_Handler_Acceptor.h"

int
Connection_Handler_Acceptor::make_svc_handler (Connection_Handler *&ph)
{
  ACE_ALLOCATOR_RETURN (ph,
                        this->connection_handler_factory_.make_connection_handler (this->connection_config_info_),
                        -1);
  return 0;
}

Connection_Handler_Acceptor::Connection_Handler_Acceptor (Event_Channel &ec,
                                                char connection_role)
  : event_channel_ (ec)
{
  this->connection_config_info_.connection_id_ = 0;
  this->connection_config_info_.host_[0] = '\0';
  this->connection_config_info_.remote_port_ = 0;
  this->connection_config_info_.connection_role_ = connection_role;
  this->connection_config_info_.max_retry_timeout_ = Options::instance ()->max_timeout ();
  this->connection_config_info_.local_port_ = 0;
  this->connection_config_info_.priority_ = 1;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Acceptor<Connection_Handler, ACE_SOCK_ACCEPTOR>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Acceptor<Connection_Handler, ACE_SOCK_ACCEPTOR>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */