载入中...
搜索中...
未找到
eve::network::Network类 参考

Network module: TCP/UDP/HTTP factories, background worker, and completion event plumbing. Script: net <- eve.Network(); 更多...

#include <Network.h>

类 eve::network::Network 继承关系图:
eve::Module eve::service::INetwork

Public 成员函数

 Module_REG (Network)
 
 Network ()
 Network.
 
 ~Network () override
 Network.
 
std::unique_ptr< TcpSocket > makeTcp ()
 Creates an owning TCP socket handle for C++ callers.
 
std::unique_ptr< UdpSocket > makeUdp ()
 Creates an owning UDP socket handle for C++ callers.
 
std::unique_ptr< HttpRequest > makeHttp (std::string method, std::string url)
 Creates an owning HTTP request handle for C++ callers.
 
std::unique_ptr< Channel > makeChannel (TcpSocket *socket)
 Creates an owning channel handle, or null for a null socket.
 
std::unique_ptr< Session > makeSession ()
 Creates an owning session handle.
 
std::unique_ptr< NetWriter > makeWriter ()
 Creates an owning streaming writer handle.
 
std::unique_ptr< NetReader > makeReader (std::string bytes)
 Creates an owning streaming reader handle.
 
std::unique_ptr< UdpLink > makeUdpLink (UdpSocket *socket)
 Creates an owning UDP link handle, or null for a null socket.
 
std::unique_ptr< NetRpc > makeRpc (UdpLink *link)
 Creates an owning RPC handle, or null for a null link.
 
std::unique_ptr< NetHost > makeHost ()
 Creates an owning UDP host handle.
 
TcpSocket * newTcp ()
 Script adapter: creates a caller-owned TCP socket.
 
UdpSocket * newUdp ()
 Script adapter: creates a caller-owned UDP socket.
 
HttpRequest * newHttp (std::string method, std::string url)
 Script adapter: creates a caller-owned HTTP request.
 
Channel * newChannel (TcpSocket *socket)
 Script adapter: creates a caller-owned channel.
 
Session * newSession ()
 Script adapter: creates a caller-owned session.
 
NetWriter * newWriter ()
 Script adapter: creates a caller-owned writer.
 
NetReader * newReader (std::string bytes)
 Script adapter: creates a caller-owned reader.
 
UdpLink * newUdpLink (UdpSocket *socket)
 Script adapter: creates a caller-owned UDP link.
 
NetRpc * newRpc (UdpLink *link)
 Script adapter: creates a caller-owned RPC client.
 
NetHost * newHost ()
 Script adapter: creates a caller-owned UDP host.
 
void setTimeout (int ms)
 Default socket/HTTP timeout in milliseconds.
 
int getTimeout () const
 Returns the timeout.
 
void setVerifySsl (bool verify)
 Whether TLS peer certificates are verified (default true).
 
bool getVerifySsl () const
 Returns the verify ssl.
 
NetTelemetrySnapshot telemetrySnapshot () const
 Return a thread-safe copied telemetry snapshot for diagnostics tools.
 
void resetTelemetry ()
 Reset cumulative telemetry counters without affecting live sockets.
 
void pump ()
 Drains worker completions and emits them as events; call per frame.
 
bool httpRequest (const std::string &method, const std::string &url, const std::string &body, int timeoutMs, int &status, std::string &responseBody) override
 Synchronous HTTP request (blocks up to timeoutMs on the worker).
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 
- Public 成员函数 继承自 eve::service::INetwork
virtual ~INetwork ()=default
 Releases INetwork resources.
 

友元

class Channel
 
class HttpRequest
 
class NetHost
 
class NetWorker
 
class TcpSocket
 
class UdpSocket
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::service::INetwork
static constexpr const char * capabilityName = "INetwork"
 

详细描述

Network module: TCP/UDP/HTTP factories, background worker, and completion event plumbing. Script: net <- eve.Network();

在文件 Network.h 第 35 行定义.

构造及析构函数说明

◆ Network()

eve::network::Network::Network ( )

Network.

在文件 Network.cpp 第 65 行定义.

◆ ~Network()

eve::network::Network::~Network ( )
override

Network.

在文件 Network.cpp 第 71 行定义.

成员函数说明

◆ getTimeout()

int eve::network::Network::getTimeout ( ) const

Returns the timeout.

在文件 Network.cpp 第 174 行定义.

被这些函数引用 eve::network::HttpRequest::submit().

◆ getVerifySsl()

bool eve::network::Network::getVerifySsl ( ) const

Returns the verify ssl.

在文件 Network.cpp 第 182 行定义.

被这些函数引用 eve::network::HttpRequest::submit().

◆ httpRequest()

bool eve::network::Network::httpRequest ( const std::string &  method,
const std::string &  url,
const std::string &  body,
int  timeoutMs,
int &  status,
std::string &  responseBody 
)
overridevirtual

◆ makeChannel()

std::unique_ptr< Channel > eve::network::Network::makeChannel ( TcpSocket *  socket)

Creates an owning channel handle, or null for a null socket.

在文件 Network.cpp 第 117 行定义.

被这些函数引用 newChannel().

◆ makeHost()

std::unique_ptr< NetHost > eve::network::Network::makeHost ( )

Creates an owning UDP host handle.

在文件 Network.cpp 第 151 行定义.

被这些函数引用 newHost().

◆ makeHttp()

std::unique_ptr< HttpRequest > eve::network::Network::makeHttp ( std::string  method,
std::string  url 
)

Creates an owning HTTP request handle for C++ callers.

在文件 Network.cpp 第 82 行定义.

引用了 method.

被这些函数引用 httpRequest() , 以及 newHttp().

◆ makeReader()

std::unique_ptr< NetReader > eve::network::Network::makeReader ( std::string  bytes)

Creates an owning streaming reader handle.

在文件 Network.cpp 第 131 行定义.

引用了 bytes , 以及 r.

被这些函数引用 newReader().

◆ makeRpc()

std::unique_ptr< NetRpc > eve::network::Network::makeRpc ( UdpLink *  link)

Creates an owning RPC handle, or null for a null link.

在文件 Network.cpp 第 146 行定义.

被这些函数引用 newRpc().

◆ makeSession()

std::unique_ptr< Session > eve::network::Network::makeSession ( )

Creates an owning session handle.

在文件 Network.cpp 第 125 行定义.

被这些函数引用 newSession().

◆ makeTcp()

std::unique_ptr< TcpSocket > eve::network::Network::makeTcp ( )

Creates an owning TCP socket handle for C++ callers.

在文件 Network.cpp 第 76 行定义.

被这些函数引用 newTcp().

◆ makeUdp()

std::unique_ptr< UdpSocket > eve::network::Network::makeUdp ( )

Creates an owning UDP socket handle for C++ callers.

在文件 Network.cpp 第 79 行定义.

被这些函数引用 newUdp().

◆ makeUdpLink()

std::unique_ptr< UdpLink > eve::network::Network::makeUdpLink ( UdpSocket *  socket)

Creates an owning UDP link handle, or null for a null socket.

在文件 Network.cpp 第 138 行定义.

被这些函数引用 newUdpLink().

◆ makeWriter()

std::unique_ptr< NetWriter > eve::network::Network::makeWriter ( )

Creates an owning streaming writer handle.

在文件 Network.cpp 第 128 行定义.

被这些函数引用 newWriter().

◆ Module_REG()

eve::network::Network::Module_REG ( Network  )

◆ newChannel()

Channel * eve::network::Network::newChannel ( TcpSocket *  socket)

Script adapter: creates a caller-owned channel.

在文件 Network.cpp 第 123 行定义.

引用了 makeChannel().

◆ newHost()

NetHost * eve::network::Network::newHost ( )

Script adapter: creates a caller-owned UDP host.

在文件 Network.cpp 第 152 行定义.

引用了 makeHost().

◆ newHttp()

HttpRequest * eve::network::Network::newHttp ( std::string  method,
std::string  url 
)

Script adapter: creates a caller-owned HTTP request.

在文件 Network.cpp 第 85 行定义.

引用了 makeHttp() , 以及 method.

◆ newReader()

NetReader * eve::network::Network::newReader ( std::string  bytes)

Script adapter: creates a caller-owned reader.

在文件 Network.cpp 第 136 行定义.

引用了 bytes , 以及 makeReader().

◆ newRpc()

NetRpc * eve::network::Network::newRpc ( UdpLink *  link)

Script adapter: creates a caller-owned RPC client.

在文件 Network.cpp 第 149 行定义.

引用了 makeRpc().

◆ newSession()

Session * eve::network::Network::newSession ( )

Script adapter: creates a caller-owned session.

在文件 Network.cpp 第 126 行定义.

引用了 makeSession().

◆ newTcp()

TcpSocket * eve::network::Network::newTcp ( )

Script adapter: creates a caller-owned TCP socket.

在文件 Network.cpp 第 77 行定义.

引用了 makeTcp().

◆ newUdp()

UdpSocket * eve::network::Network::newUdp ( )

Script adapter: creates a caller-owned UDP socket.

在文件 Network.cpp 第 80 行定义.

引用了 makeUdp().

被这些函数引用 eve::network::NetHost::start().

◆ newUdpLink()

UdpLink * eve::network::Network::newUdpLink ( UdpSocket *  socket)

Script adapter: creates a caller-owned UDP link.

在文件 Network.cpp 第 144 行定义.

引用了 makeUdpLink().

◆ newWriter()

NetWriter * eve::network::Network::newWriter ( )

Script adapter: creates a caller-owned writer.

在文件 Network.cpp 第 129 行定义.

引用了 makeWriter().

◆ pump()

void eve::network::Network::pump ( )

Drains worker completions and emits them as events; call per frame.

在文件 Network.cpp 第 428 行定义.

引用了 c, eve::network::Data, hit , 以及 eve::network::Udp.

◆ resetTelemetry()

void eve::network::Network::resetTelemetry ( )

Reset cumulative telemetry counters without affecting live sockets.

在文件 Network.cpp 第 222 行定义.

◆ setTimeout()

void eve::network::Network::setTimeout ( int  ms)

Default socket/HTTP timeout in milliseconds.

在文件 Network.cpp 第 170 行定义.

◆ setVerifySsl()

void eve::network::Network::setVerifySsl ( bool  verify)

Whether TLS peer certificates are verified (default true).

在文件 Network.cpp 第 178 行定义.

◆ telemetrySnapshot()

友元及相关函数文档

◆ Channel

friend class Channel
friend

在文件 Network.h 第 108 行定义.

◆ HttpRequest

friend class HttpRequest
friend

在文件 Network.h 第 109 行定义.

◆ NetHost

friend class NetHost
friend

在文件 Network.h 第 110 行定义.

◆ NetWorker

friend class NetWorker
friend

在文件 Network.h 第 111 行定义.

◆ TcpSocket

friend class TcpSocket
friend

在文件 Network.h 第 112 行定义.

◆ UdpSocket

friend class UdpSocket
friend

在文件 Network.h 第 113 行定义.


该类的文档由以下文件生成: