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

📄 htbp_addr.cpp

📁 ACE自适配通信环境(ADAPTIVE Communication Environment)是可以自由使用、开放源码的面向对象(OO)框架(Framework)
💻 CPP
字号:
// HTBP_Addr.cpp,v 1.2 2005/11/27 12:11:35 ossama Exp#include "HTBP_Addr.h"#include "ace/OS_NS_string.h"ACE_RCSID (HTBP,           ACE_HTBP_Addr,           "HTBP_Addr.cpp,v 1.2 2005/11/27 12:11:35 ossama Exp")ACE_BEGIN_VERSIONED_NAMESPACE_DECL// ConstructorACE::HTBP::Addr::Addr (){}// Creates a ACE_INET_Addr from a PORT_NUMBER and the remote// HOST_NAME.ACE::HTBP::Addr::Addr (u_short port_number,                       const char host_name[],                       int address_family)  : ACE_INET_Addr (port_number, host_name, address_family),    htid_ (){}ACE::HTBP::Addr::Addr (const char *htid)  : htid_(htid){}ACE::HTBP::Addr::Addr (const ACE::HTBP::Addr &other)  : ACE_INET_Addr (other),    htid_(other.htid_){}// DestructorACE::HTBP::Addr::~Addr (){}intACE::HTBP::Addr::set (u_short port,                      const char host[],                      const char *htid){  if (htid != 0 && ACE_OS::strlen (htid) != 0)    return this->set_htid (htid);  return this->ACE_INET_Addr::set(port,host);}intACE::HTBP::Addr::set_htid (const char *htid){  this->htid_ = htid;  this->set_port_number (0);  return 0;}const char *ACE::HTBP::Addr::get_htid (void) const{  return this->htid_.c_str();}intACE::HTBP::Addr::addr_to_string (ACE_TCHAR buffer[],                                 size_t size,                                 int ipaddr_format) const{  if (this->htid_.length() == 0)    return this->ACE_INET_Addr::addr_to_string(buffer,size,ipaddr_format);  if (size < htid_.length())    return -1;  ACE_OS::strncpy (buffer,                   ACE_TEXT_CHAR_TO_TCHAR(htid_.c_str()),                   size);  return 0;}intACE::HTBP::Addr::string_to_addr (const char address[]){  //  if (ACE_OS::strchr (address,':'))    return this->ACE_INET_Addr::string_to_addr(address);    //  this->htid_ = address;    //  return 0;}ACE_END_VERSIONED_NAMESPACE_DECL

⌨️ 快捷键说明

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