ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
asio_tcp.cpp File Reference

实现TCP接受循环、会话创建和数据分发。 More...

#include "tools/serialize/pack.h"
#include "net/tcp/asio_tcp.h"
#include "net/net_session.h"
#include "net/asio_timer.h"
#include "tools/log/nlog.h"
#include <array>
#include <future>
#include <utility>
#include <vector>

Functions

bool ngl::tcp::should_ignore_socket_close_error (const basio_errorcode &ec)
bool ngl::tcp::should_ignore_read_error (const basio_errorcode &ec)
bool ngl::tcp::should_ignore_acceptor_close_error (const basio_errorcode &ec)
bool ngl::tcp::is_optional_ipv6_acceptor_error (const basio_errorcode &ec)
std::shared_ptr< basio_tcpacceptorngl::tcp::create_acceptor (basio_ioservice &aioservice, const basio_iptcpendpoint &aendpoint)

Variables

constexpr int32_t ngl::tcp::tcp_connect_interval_ms

Detailed Description

实现TCP接受循环、会话创建和数据分发。

Variable Documentation

◆ tcp_connect_interval_ms

int32_t ngl::tcp::tcp_connect_interval_ms
constexpr
Initial value:
=
asio_tcp::etcp_connect_interval * static_cast<int32_t>(tools::time::MILLISECOND)