43 std::atomic_bool _bEnd;
45 std::mutex _mutexSend;
46 std::list<Buffer> _listSend;
47 std::list<Buffer> _listSendTemp;
48 static void _thread_run(
void*);
65 static void _thread_run(
void*);
91 return vec.empty() ?
"127.0.0.1" : vec[0];
96 log_msg(
"----------------网络信息-------------\n"
104extern Network*
g_net;
void Send(BufferView buf)
static std::string GetIpAddressLocalFirst(bool ipv4=true)
返回第一个本地ip,失败返回127.0.0.1
static std::vector< std::string > GetIpAddressLocal(bool ipv4=true)
返回本地ip
static std::string GetHostName()
返回主机名
constexpr uint32_t NETWORK_MESSAGE_TAG
std::span< std::byte > BufferView