cpp-mirai-client  v2.6.1
cpp client for mirai-api-http
Mirai::HttpWsAdaptorConfig结构体 参考

#include <HttpWsAdaptor.hpp>

Mirai::HttpWsAdaptorConfig 的协作图:
[图例]

Public 成员函数

void FromJsonFile (const std::string &path)
 从JSON文件中读取配置 更多...
 
void FromTOMLFile (const std::string &path)
 从TOML文件中读取配置 更多...
 

Public 属性

std::string HttpUrl = "http://localhost:8080"
 Http adapter地址 更多...
 
std::chrono::milliseconds ConnectionTimeout = std::chrono::seconds(30)
 连接超时时间 更多...
 
std::chrono::milliseconds ReadTimeout = std::chrono::seconds(5)
 读取超时时间 更多...
 
std::chrono::milliseconds WriteTimeout = std::chrono::seconds(5)
 写入超时时间 更多...
 
std::string WebsocketUrl = "ws://localhost:8080"
 Websocket adapter地址 更多...
 
std::chrono::seconds HeartbeatInterval = std::chrono::seconds(60)
 心跳信息间隔 更多...
 
std::chrono::seconds HandshakeTimeout = std::chrono::seconds(60)
 握手超时时间 更多...
 
bool EnablePong = true
 开启自动回复ping 更多...
 
bool EnableDeflate
 开启数据压缩 更多...
 
bool AutoReconnect = true
 开启自动重连 更多...
 
std::chrono::milliseconds MinRetryInterval = std::chrono::seconds(1)
 最小重连时间间隔 更多...
 
std::chrono::milliseconds MaxRetryInterval = std::chrono::seconds(30)
 最大重连时间间隔 更多...
 
QQ_t BotQQ = 12345_qq
 BotQQ 更多...
 
std::string VerifyKey = ""
 验证密钥 更多...
 

详细描述

在文件 HttpWsAdaptor.hpp27 行定义.

成员函数说明

◆ FromJsonFile()

void Mirai::HttpWsAdaptorConfig::FromJsonFile ( const std::string &  path)

从JSON文件中读取配置

◆ FromTOMLFile()

void Mirai::HttpWsAdaptorConfig::FromTOMLFile ( const std::string &  path)

从TOML文件中读取配置

类成员变量说明

◆ HttpUrl

std::string Mirai::HttpWsAdaptorConfig::HttpUrl = "http://localhost:8080"

Http adapter地址

在文件 HttpWsAdaptor.hpp30 行定义.

◆ ConnectionTimeout

std::chrono::milliseconds Mirai::HttpWsAdaptorConfig::ConnectionTimeout = std::chrono::seconds(30)

连接超时时间

在文件 HttpWsAdaptor.hpp32 行定义.

◆ ReadTimeout

std::chrono::milliseconds Mirai::HttpWsAdaptorConfig::ReadTimeout = std::chrono::seconds(5)

读取超时时间

在文件 HttpWsAdaptor.hpp34 行定义.

◆ WriteTimeout

std::chrono::milliseconds Mirai::HttpWsAdaptorConfig::WriteTimeout = std::chrono::seconds(5)

写入超时时间

在文件 HttpWsAdaptor.hpp36 行定义.

◆ WebsocketUrl

std::string Mirai::HttpWsAdaptorConfig::WebsocketUrl = "ws://localhost:8080"

Websocket adapter地址

在文件 HttpWsAdaptor.hpp39 行定义.

◆ HeartbeatInterval

std::chrono::seconds Mirai::HttpWsAdaptorConfig::HeartbeatInterval = std::chrono::seconds(60)

心跳信息间隔

在文件 HttpWsAdaptor.hpp41 行定义.

◆ HandshakeTimeout

std::chrono::seconds Mirai::HttpWsAdaptorConfig::HandshakeTimeout = std::chrono::seconds(60)

握手超时时间

在文件 HttpWsAdaptor.hpp43 行定义.

◆ EnablePong

bool Mirai::HttpWsAdaptorConfig::EnablePong = true

开启自动回复ping

在文件 HttpWsAdaptor.hpp45 行定义.

◆ EnableDeflate

bool Mirai::HttpWsAdaptorConfig::EnableDeflate
初始值:
=
false

开启数据压缩

在文件 HttpWsAdaptor.hpp47 行定义.

◆ AutoReconnect

bool Mirai::HttpWsAdaptorConfig::AutoReconnect = true

开启自动重连

在文件 HttpWsAdaptor.hpp55 行定义.

◆ MinRetryInterval

std::chrono::milliseconds Mirai::HttpWsAdaptorConfig::MinRetryInterval = std::chrono::seconds(1)

最小重连时间间隔

在文件 HttpWsAdaptor.hpp57 行定义.

◆ MaxRetryInterval

std::chrono::milliseconds Mirai::HttpWsAdaptorConfig::MaxRetryInterval = std::chrono::seconds(30)

最大重连时间间隔

在文件 HttpWsAdaptor.hpp59 行定义.

◆ BotQQ

QQ_t Mirai::HttpWsAdaptorConfig::BotQQ = 12345_qq

BotQQ

在文件 HttpWsAdaptor.hpp62 行定义.

◆ VerifyKey

std::string Mirai::HttpWsAdaptorConfig::VerifyKey = ""

验证密钥

在文件 HttpWsAdaptor.hpp64 行定义.


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