类 WebSocketTransportConfig.Builder
java.lang.Object
io.agentscope.core.model.transport.websocket.WebSocketTransportConfig.Builder
Builder for WebSocketTransportConfig.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Build the WebSocketTransportConfig.connectTimeout(Duration connectTimeout) Set the connect timeout.ignoreSsl(boolean ignoreSsl) Set whether to ignore SSL certificate verification.pingInterval(Duration pingInterval) Set the ping interval for heartbeat (OkHttp only).proxy(ProxyConfig proxyConfig) Set the proxy configuration.readTimeout(Duration readTimeout) Set the read timeout.writeTimeout(Duration writeTimeout) Set the write timeout.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
connectTimeout
Set the connect timeout.- 参数:
connectTimeout- the connect timeout duration- 返回:
- this builder
-
readTimeout
Set the read timeout.- 参数:
readTimeout- the read timeout duration- 返回:
- this builder
-
writeTimeout
Set the write timeout.- 参数:
writeTimeout- the write timeout duration- 返回:
- this builder
-
pingInterval
Set the ping interval for heartbeat (OkHttp only).- 参数:
pingInterval- the ping interval duration- 返回:
- this builder
-
proxy
Set the proxy configuration.Supports HTTP and SOCKS proxies. See
ProxyConfigfor details.- 参数:
proxyConfig- the proxy configuration- 返回:
- this builder
-
ignoreSsl
Set whether to ignore SSL certificate verification.Warning: Setting this to true disables SSL certificate verification, which makes the connection vulnerable to man-in-the-middle attacks. This should only be used for testing or with trusted self-signed certificates.
- 参数:
ignoreSsl- true to ignore SSL certificate verification, false otherwise- 返回:
- this builder
-
build
Build the WebSocketTransportConfig.- 返回:
- a new WebSocketTransportConfig instance
-