STTNet 0.7.0

English Core API Quick Reference

A concise English reference for the public APIs used throughout the programming guide.

The generated Doxygen tree is built from the single canonical header. Some detailed source comments are still Chinese. This page provides an English reference for the core public APIs used by the guide; the full generated tree remains available for complete signatures and members.

Server classes

ClassCore purposeMost-used methods
HttpServerHTTP/HTTPS server on the TcpServer Reactor.setFunction, setGlobalSolveFunction, setGetKeyFunction, putTask, startListen, setTLS, close
WebSocketServerWS/WSS server with RFC 6455 parsing and heartbeat.setJudgeFunction, setStartFunction, setGlobalSolveFunction, setFunction, sendMessage, closeFD
TcpServerRaw TCP server for custom framed protocols.setGlobalSolveFunction, setGetKeyFunction, setFunction, putTask, startListen
UdpServerBound UDP socket used with an explicit receive loop.recvData, sendData, close

HTTP request and response

APIMeaning
HttpRequestInformation::typeHTTP method.
locPara / loc / paraPath+query / path only / raw query beginning with ?.
headerValue(name)Case-insensitive, non-owning header view.
bodyView()Non-owning view of Content-Length or chunked body.
sendTextText response with Content-Type and Content-Length.
sendJsonSerialize Json::Value and send application/json.
redirectLocation response with CR/LF validation.

Flow results

ResultMeaning
1Stage succeeded; continue if another stage exists.
0Stage was delegated to WorkerPool.
-1Remaining stages stop while the connection stays open.
-2Processing stops and the connection closes.

Production controls

APIPurpose
setSocketOptionsTCP_NODELAY, keepalive, backlog, buffers, and Linux options.
setMaxPendingWriteBytesPer-connection output high-water mark.
setWriteBudgetPerEventReactor write fairness budget.
setMaxPendingWorkerTasksBound queued blocking work.
setGracefulShutdownTimeoutDrain deadline for close/stop.
getMetricsLock-free snapshot of connection, queue, send, and overflow counters.

Complete generated API tree →