TsgcWSAPIServer_WebAuthn › 方法 › KeepAlive
在给定连接上发送保活 ping,防止已认证的会话超时。
procedure KeepAlive(const aConnection: TsgcWSConnection; const aMessage: string);
| 名称 | 类型 | 描述 |
|---|---|---|
aConnection | const TsgcWSConnection | 必须传递保活消息的连接。 |
aMessage | const string | 随 keep-alive 发送的可选有效载荷;为空时使用协议定义的 ping。 |
刷新与连接关联的 WebAuthn 会话的时间戳,以防止短期令牌在客户端空闲时失效。当长时间连接必须保持身份验证时,请从计时器定期调用。
sgcWSAPIServer_WebAuthn1.KeepAlive(aConnection, 'ping');