NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
neforce::http::websocket_deflate类 参考

per-message deflate 压缩/解压器 更多...

#include <websocket_deflate.hpp>

Public 成员函数

 websocket_deflate (bool compress, int window_bits, bool no_context_takeover)
 构造压缩/解压器
string process (string_view data, bool is_final)
 处理消息(压缩或解压)
void reset_context ()
 重置上下文(新消息开始时调用)

详细描述

per-message deflate 压缩/解压器

每个 WebSocket 会话持有两个实例:

  • 一个用于发送方向(压缩)
  • 一个用于接收方向(解压)

支持上下文接管优化(跨消息复用 zlib 流状态)。

在文件 websocket_deflate.hpp72 行定义.

构造及析构函数说明

◆ websocket_deflate()

neforce::http::websocket_deflate::websocket_deflate ( bool compress,
int window_bits,
bool no_context_takeover )

构造压缩/解压器

参数
compresstrue=压缩模式, false=解压模式
window_bits窗口比特位 (8-15)
no_context_takeover每消息结束后是否重置上下文

引用了 websocket_deflate().

被这些函数引用 reset_context() , 以及 websocket_deflate().

成员函数说明

◆ process()

string neforce::http::websocket_deflate::process ( string_view data,
bool is_final )

处理消息(压缩或解压)

参数
data输入数据
is_final是否最终片段
返回
处理后的数据

引用了 neforce::data() , 以及 process().

被这些函数引用 process() , 以及 reset_context().


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