⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connection_handler_acceptor.cpp

📁 ace开发环境 用来开发网络程序 其运用了设计模式、多平台、C++等多种知识
💻 CPP
字号:
// $Id: Connection_Handler_Acceptor.cpp 72206 2006-04-20 11:07:09Z jwillemsen $#define ACE_BUILD_SVC_DLL#include "Event_Channel.h"#include "Connection_Handler_Acceptor.h"ACE_RCSID(Gateway, Connection_Handler_Acceptor, "$Id: Connection_Handler_Acceptor.cpp 72206 2006-04-20 11:07:09Z jwillemsen $")intConnection_Handler_Acceptor::make_svc_handler (Connection_Handler *&ch){  ACE_ALLOCATOR_RETURN (ch,                        this->connection_handler_factory_.make_connection_handler (this->connection_config_info_),                        -1);  return 0;}intConnection_Handler_Acceptor::accept_svc_handler (Connection_Handler *ch){  if (this->inherited::accept_svc_handler (ch) == -1)    return -1;  else    {      ch->connection_id (Options::instance ()->connection_id ());      ACE_INET_Addr remote_addr;      if (ch->peer ().get_remote_addr (remote_addr) == -1)        return -1;      // Set the remote address of our connected Peer.      ch->remote_addr (remote_addr);      // Set the Event_Channel pointer.      ch->event_channel (&this->event_channel_);      // Increment the connection ID by one.      Options::instance ()->connection_id ()++;      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;}

⌨️ 快捷键说明

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