Class: TencentCloud::Teo::V20220901::WebSocketParameters

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20220901/models.rb

Overview

WebSocket 配置。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, timeout = nil) ⇒ WebSocketParameters

Returns a new instance of WebSocketParameters.



23074
23075
23076
23077
# File 'lib/v20220901/models.rb', line 23074

def initialize(switch=nil, timeout=nil)
  @Switch = switch
  @Timeout = timeout
end

Instance Attribute Details

#SwitchObject

<li>on:使用 Timeout 作为 WebSocket 超时时间;</li> <li>off:平台仍支持 WebSocket 连接,此时使用系统默认的 15 秒为超时时间。</li>

Parameters:

  • Switch:

    WebSocket 超时时间配置开关,取值有:

  • Timeout:

    超时时间,单位为秒,最大超时时间 120 秒。
    注意:当 Switch 为 on 时,此字段必填,否则此字段不生效。



23072
23073
23074
# File 'lib/v20220901/models.rb', line 23072

def Switch
  @Switch
end

#TimeoutObject

<li>on:使用 Timeout 作为 WebSocket 超时时间;</li> <li>off:平台仍支持 WebSocket 连接,此时使用系统默认的 15 秒为超时时间。</li>

Parameters:

  • Switch:

    WebSocket 超时时间配置开关,取值有:

  • Timeout:

    超时时间,单位为秒,最大超时时间 120 秒。
    注意:当 Switch 为 on 时,此字段必填,否则此字段不生效。



23072
23073
23074
# File 'lib/v20220901/models.rb', line 23072

def Timeout
  @Timeout
end

Instance Method Details

#deserialize(params) ⇒ Object



23079
23080
23081
23082
# File 'lib/v20220901/models.rb', line 23079

def deserialize(params)
  @Switch = params['Switch']
  @Timeout = params['Timeout']
end