diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index ceb8ff083026bb926c21cf93b5cf87ced580a042..f8856d93d5238657f464147adfafaca34c72d08b 100644 --- a/api/@ohos.net.webSocket.d.ts +++ b/api/@ohos.net.webSocket.d.ts @@ -171,6 +171,28 @@ declare namespace webSocket { * @since 12 */ protocol?: string; + + /** + * Self defined interval of ping frame. + * default: 30. disable: 0. max: 30000. unit:second. + * Ping is performed at every pingInterval. + * @type {?int} + * @syscap SystemCapability.Communication.NetStack + * @since 21 + * @arkts 1.2 + */ + pingInterval?: int; + + /** + * Self defined timeout of pong frame. + * default: 30. max: 30000. unit:second. The value must be less than or equal to pingInterval. + * If no pong is received with the pongTimeout period, the websocket connection will be disconnected. + * @type {?int} + * @syscap SystemCapability.Communication.NetStack + * @since 21 + * @arkts 1.2 + */ + pongTimeout?: int; } /**