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

📄 nattypes.h

📁 本人收集整理的一份c/c++跨平台网络库
💻 H
字号:
#ifndef UTILS_BASE_NATTYPE_H_#define UTILS_BASE_NATTYPE_H_namespace utils_base {/* Identifies each type of NAT that can be simulated. */enum NATType {  NAT_OPEN_CONE,  NAT_ADDR_RESTRICTED,  NAT_PORT_RESTRICTED,  NAT_SYMMETRIC};// Implements the rules for each specific type of NAT.class NAT {public:  // Determines whether this NAT uses both source and destination address when  // checking whether a mapping already exists.  virtual bool IsSymmetric() = 0;  // Determines whether this NAT drops packets received from a different IP  // the one last sent to.  virtual bool FiltersIP() = 0;  // Determines whether this NAT drops packets received from a different port  // the one last sent to.  virtual bool FiltersPort() = 0;  // Returns an implementation of the given type of NAT.  static NAT* Create(NATType type);};} // namespace utils_base#endif // UTILS_BASE_NATTYPE_H_

⌨️ 快捷键说明

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