From 067b765e364407d1a7f9850eb9398dbb8d66234a Mon Sep 17 00:00:00 2001 From: 177******89 <1225095037@qq.com> Date: Mon, 1 Sep 2025 03:29:40 +0000 Subject: [PATCH 1/2] update api/@ohos.net.webSocket.d.ts. Signed-off-by: 177******89 <1225095037@qq.com> --- api/@ohos.net.webSocket.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index ceb8ff0830..fb2df1aca9 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; } /** -- Gitee From e346c121c30d2effd04904e5e7576980013c03b2 Mon Sep 17 00:00:00 2001 From: 177******89 <1225095037@qq.com> Date: Tue, 2 Sep 2025 00:26:01 +0000 Subject: [PATCH 2/2] update api/@ohos.net.webSocket.d.ts. Signed-off-by: 177******89 <1225095037@qq.com> --- api/@ohos.net.webSocket.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index fb2df1aca9..f8856d93d5 100644 --- a/api/@ohos.net.webSocket.d.ts +++ b/api/@ohos.net.webSocket.d.ts @@ -176,7 +176,7 @@ declare namespace webSocket { * Self defined interval of ping frame. * default: 30. disable: 0. max: 30000. unit:second. * Ping is performed at every pingInterval. - * @type{?int} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @since 21 * @arkts 1.2 @@ -187,7 +187,7 @@ declare namespace webSocket { * 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} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @since 21 * @arkts 1.2 -- Gitee