WebSocket configuration
Technical reference of Configuración WebSocket.
This API is used in WebSocket configuration.
Symbols
| Symbol | Class | Description |
|---|---|---|
| WebSocketConfig | type | WebSocketConfig defines a public type of API. |
| WebSocketHeartbeatConfig | type | WebSocketHeartbeatConfig defines a public type of API. |
| WebSocketQueueConfig | type | WebSocketQueueConfig defines a public type of API. |
| WebSocketBufferConfig | type | WebSocketBufferConfig defines a public type of API. |
| WebSocketCompressionConfig | type | WebSocketCompressionConfig defines a public type of API. |
WebSocketConfig
Declaration:
type WebSocketConfig struct {
Enabled bool
HandshakeTimeout time.Duration
MaxMessageSize int64
WriteTimeout time.Duration
Heartbeat WebSocketHeartbeatConfig
Queue WebSocketQueueConfig
Buffers WebSocketBufferConfig
Compression WebSocketCompressionConfig
} WebSocketConfig defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
Enabled | bool | Activate or disable the function. |
HandshakeTimeout | time.Duration | Maximum waiting time. |
MaxMessageSize | int64 | Size in bytes. |
WriteTimeout | time.Duration | Maximum waiting time. |
Heartbeat | WebSocketHeartbeatConfig | Public data associated with Heartbeat. |
Queue | WebSocketQueueConfig | Public data associated with Queue. |
Buffers | WebSocketBufferConfig | Public data associated with Buffers. |
Compression | WebSocketCompressionConfig | Public data associated with Compression. |
WebSocketHeartbeatConfig
Declaration:
type WebSocketHeartbeatConfig struct {
PingInterval time.Duration
PongTimeout time.Duration
} WebSocketHeartbeatConfig defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
PingInterval | time.Duration | Time interval. |
PongTimeout | time.Duration | Maximum waiting time. |
WebSocketQueueConfig
Declaration:
type WebSocketQueueConfig struct {
MaxMessages int
MaxBytes int64
} WebSocketQueueConfig defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
MaxMessages | int | Public data associated with MaxMessages. |
MaxBytes | int64 | Number of bytes. |
WebSocketBufferConfig
Declaration:
type WebSocketBufferConfig struct {
ReadSize int
WriteSize int
} WebSocketBufferConfig defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
ReadSize | int | Size in bytes. |
WriteSize | int | Size in bytes. |
WebSocketCompressionConfig
Declaration:
type WebSocketCompressionConfig struct {
Enabled bool
Level int
} WebSocketCompressionConfig defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
Enabled | bool | Activate or disable the function. |
Level | int | Public data associated with Level. |