文档

支持

Vivox Unity SDK

Vivox Unity SDK

防灌填

Implement anti-flooding measures for text chat.
阅读时间1 分钟最后更新于 13 天前

可通过配置预登录参数
MaxTextMessageRate
设置速率限制。设置为 0 则会禁用该功能。
速率限制由 Vivox SDK 强制执行。如果用户试图以超出许可范围的速率发送消息,则会返回
VxErrorMessageTextRateExceeded
错误。
vx_req_account_send_msg *req;vx_req_account_send_msg_create(&req);req->connector_handle = vx_strdup("c1");req->account_handle = vx_strdup(".issuer-w-dev.mytestaccountname.");req->language = vx_strdup(“en-us”);req->user_uri = vx_strdup("sip:theotheruser@vd1.vivox.com");req->message_body = vx_strdup("Hey there buddy!");int status = vx_issue_request2(&req->base); // If rate limiting is surpassed, status = VxErrorMessageTextRateExceeded