STTNet 0.7.0
载入中...
搜索中...
未找到
stt::network::WebSocketFDInformation结构体 参考

保存客户端WS/WSS请求信息的结构体 更多...

#include <sttnet.h>

Public 属性

int fd =-1
 底层的socket套接字
 
uint64_t connection_obj_fd =0
 连接对象fd
 
bool closeflag =false
 true:发送了关闭帧 false:没有发送关闭帧
 
std::string locPara
 握手阶段的Http/Https路径和参数
 
std::string header
 握手阶段的Http/Https请求头
 
time_t HBTime =0
 发送心跳的时间(没有发送过就填0) (检查完又要清空为0)
 
time_t response =0
 上次收到信息的时间
 
size_t recv_length =0
 待接收的长度
 
size_t have_recv_length =0
 已经接收的长度
 
int message_type =0
 消息类型
 
std::string message =""
 消息
 
bool fin =true
 fin的状态
 
uint8_t fragmented_opcode =0
 
std::string fragmented_message
 
std::string mask
 mask
 
std::unordered_map< std::string, std::any > ctx
 所需的数据仓库
 
HttpRequestInformation httpinf
 握手阶段保存的http信息
 

详细描述

保存客户端WS/WSS请求信息的结构体

类成员变量说明

◆ closeflag

bool stt::network::WebSocketFDInformation::closeflag =false

true:发送了关闭帧 false:没有发送关闭帧

◆ connection_obj_fd

uint64_t stt::network::WebSocketFDInformation::connection_obj_fd =0

连接对象fd

◆ ctx

std::unordered_map<std::string,std::any> stt::network::WebSocketFDInformation::ctx

所需的数据仓库

◆ fd

int stt::network::WebSocketFDInformation::fd =-1

底层的socket套接字

◆ fin

bool stt::network::WebSocketFDInformation::fin =true

fin的状态

◆ fragmented_message

std::string stt::network::WebSocketFDInformation::fragmented_message

分片消息的累计 payload,受服务器每连接接收上限约束。

◆ fragmented_opcode

uint8_t stt::network::WebSocketFDInformation::fragmented_opcode =0

正在接收的分片消息 opcode;0 表示当前没有分片消息。

◆ have_recv_length

size_t stt::network::WebSocketFDInformation::have_recv_length =0

已经接收的长度

◆ HBTime

time_t stt::network::WebSocketFDInformation::HBTime =0

发送心跳的时间(没有发送过就填0) (检查完又要清空为0)

◆ header

std::string stt::network::WebSocketFDInformation::header

握手阶段的Http/Https请求头

◆ httpinf

HttpRequestInformation stt::network::WebSocketFDInformation::httpinf

握手阶段保存的http信息

◆ locPara

std::string stt::network::WebSocketFDInformation::locPara

握手阶段的Http/Https路径和参数

◆ mask

std::string stt::network::WebSocketFDInformation::mask

mask

◆ message

std::string stt::network::WebSocketFDInformation::message =""

消息

◆ message_type

int stt::network::WebSocketFDInformation::message_type =0

消息类型

◆ recv_length

size_t stt::network::WebSocketFDInformation::recv_length =0

待接收的长度

◆ response

time_t stt::network::WebSocketFDInformation::response =0

上次收到信息的时间


该结构体的文档由以下文件生成: