RMVL  2.5.0-dev
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
rm::async::HttpServer类 参考final

HTTP 服务器 更多...

#include <rmvl/io/netapp.hpp>

rm::async::HttpServer 的协作图:

Public 成员函数

 HttpServer (Webapp &app)
 创建 HTTP 服务器
 HttpServer (const HttpServer &)=delete
HttpServeroperator= (const HttpServer &)=delete
 HttpServer (HttpServer &&) noexcept=delete
HttpServeroperator= (HttpServer &&) noexcept=delete
 ~HttpServer ()
void listen (uint16_t port, std::function< void()> callback=nullptr)
 监听指定端口
Task spin ()
 启动监听任务循环
Task spinWithoutSigint ()
 启动监听任务循环,不启用 SIGINT 信号处理
bool running () const noexcept
 是否正在运行
void stop () noexcept
 停止运行

详细描述

HTTP 服务器

负责 TCP 监听和连接调度,应用路由与中间件由 Webapp 提供。

构造及析构函数说明

◆ HttpServer() [1/3]

rm::async::HttpServer::HttpServer ( Webapp & app)
inlineexplicit

创建 HTTP 服务器

◆ HttpServer() [2/3]

rm::async::HttpServer::HttpServer ( const HttpServer & )
delete
函数调用图:

◆ HttpServer() [3/3]

rm::async::HttpServer::HttpServer ( HttpServer && )
deletenoexcept
函数调用图:

◆ ~HttpServer()

rm::async::HttpServer::~HttpServer ( )
函数调用图:

成员函数说明

◆ listen()

void rm::async::HttpServer::listen ( uint16_t port,
std::function< void()> callback = nullptr )
inline

监听指定端口

函数调用图:

◆ operator=() [1/2]

HttpServer & rm::async::HttpServer::operator= ( const HttpServer & )
delete
函数调用图:

◆ operator=() [2/2]

HttpServer & rm::async::HttpServer::operator= ( HttpServer && )
deletenoexcept
函数调用图:

◆ running()

bool rm::async::HttpServer::running ( ) const
inlinenodiscardnoexcept

是否正在运行

◆ spin()

Task rm::async::HttpServer::spin ( )
nodiscard

启动监听任务循环

◆ spinWithoutSigint()

Task rm::async::HttpServer::spinWithoutSigint ( )
nodiscard

启动监听任务循环,不启用 SIGINT 信号处理

◆ stop()

void rm::async::HttpServer::stop ( )
inlinenoexcept

停止运行