host.h
来自「本人收集整理的一份c/c++跨平台网络库」· C头文件 代码 · 共 33 行
H
33 行
#ifndef UTILS_BASE_HOST_H_#define UTILS_BASE_HOST_H_#include <string>#include <vector>#include "network.h"namespace utils_base {// Provides information about a host in the network.class Host {public: Host(const std::string& name, std::vector<Network*>* networks) : name_(name), networks_(networks) { } const std::string& name() const { return name_; } const std::vector<Network*>& networks() const { return *networks_; }private: std::string name_; std::vector<Network*>* networks_;};// Returns a reference to the description of the local host.const Host& LocalHost();// Returns the name of the local host.std::string GetHostName();} // namespace utils_base#endif // UTILS_BASE_HOST_H_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?