QMaskGeneratorclass provides an abstract base for custom 32-bit mask generators. 更多 …
WebSockets 规范描述于 RFC 6455 要求屏蔽从客户端到服务器的所有通信。这是为阻止不良行为代理的恶意脚本攻击。有关良好屏蔽的重要性的更多信息,见 “Talking to Yourself for Fun and Profit” by Lin-Shung Huang et al 。默认情况下
QWebSocket使用相当安全的global()->generate() function. The best measure against attacks mentioned in the document above, is to useQWebSocket通过安全连接 ( wss:// )。通常,始终小心不要让第 3 方脚本访问QWebSocket在您的应用程序中。
QMaskGenerator
(
[
parent=None
]
)
¶
- param parent
QObject
创建新
QMaskGenerator
object with the given optional
QObject
parent
.
PySide2.QtWebSockets.QMaskGenerator.
nextMask
(
)
¶
quint32
返回新的随机 32 位掩码。随机性取决于用于创建掩码的 RNG。
PySide2.QtWebSockets.QMaskGenerator.
seed
(
)
¶
bool
初始化
QMaskGenerator
by seeding the randomizer. When is not called, it depends on the specific implementation of a subclass if a default seed is used or no seed is used at all. Returns
true
若播种成功,否则 false。