载入中...
搜索中...
未找到
Network.h
浏览该文件的文档.
Definition Module.h:43
Length-prefixed (big-endian uint32) message framing over a TcpSocket. sendMsg() writes one framed mes...
Definition Channel.h:21
Asynchronous HTTP request (Poco-based). Configure headers/body, call submit(), then receive the respo...
Definition HttpRequest.h:24
Definition NetHost.h:22
Definition NetStream.h:48
Definition NetRpc.h:25
Background thread that runs blocking socket I/O and HTTP jobs. Completions are queued and drained by ...
Definition NetWorker.h:20
Definition NetStream.h:17
Network module: TCP/UDP/HTTP factories, background worker, and completion event plumbing....
Definition Network.h:30
NetReader * newReader(std::string bytes)
Creates a streaming byte reader over a string buffer.
Definition Network.cpp:114
void watchTcp(TcpSocket *sock)
Internal: register/unregister sockets for pump polling.
Definition Network.cpp:175
UdpLink * newUdpLink(UdpSocket *socket)
Creates a framed UDP link over a socket.
Definition Network.cpp:120
void setVerifySsl(bool verify)
Whether TLS peer certificates are verified (default true).
Definition Network.cpp:159
void bindChannel(TcpSocket *sock, Channel *ch)
Internal: bind a Channel to its socket (and reverse lookup).
Definition Network.cpp:197
HttpRequest * newHttp(std::string method, std::string url)
Creates a new HTTP request (method e.g. "GET"/"POST", full URL).
Definition Network.cpp:95
void bindUdpLink(UdpSocket *sock, UdpLink *link)
Definition Network.cpp:135
Channel * channelFor(TcpSocket *sock) const
Definition Network.cpp:207
Module_REG(Network)
void pump()
Drains worker completions and emits them as events; call per frame.
Definition Network.cpp:363
void pollSockets()
Internal: polls watched sockets; called from the NetWorker thread.
Definition Network.cpp:213
void drainForTest(std::vector< NetCompletion > &out)
Test helper: drains pending completions into out.
Definition Network.cpp:171
void post(NetCompletion c)
Posts a completion to the worker queue (thread-safe).
Definition Network.cpp:167
Channel * newChannel(TcpSocket *socket)
Creates a length-prefixed Channel over a TCP socket.
Definition Network.cpp:99
void bindUdpHost(UdpSocket *sock, NetHost *host)
Definition Network.cpp:143
Named collection of Channels (a "session"). Lookup by name, close all. Does not own the channels; the...
Definition Session.h:14
TCP socket backed by Poco::Net; supports both client (connect) and server (listen/accept) roles....
Definition TcpSocket.h:28
Definition UdpLink.h:29
UDP socket backed by Poco::Net; supports connect/bind and datagram send.
Definition UdpSocket.h:24
Definition Channel.cpp:12
@ Channel
One asynchronous network result/event. handle points at the originating TcpSocket/UdpSocket/HttpReque...
Definition NetTypes.h:33