You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To set a custom configuration, refer to the server's SetTimeoutConfig method.
62
62
// If no configuration is passed, a default configuration is generated via the NewServerTimeoutConfig function.
63
63
typeServerTimeoutConfigstruct {
64
-
WriteWaittime.Duration// The timeout for network write operations. After a timeout, the connection is closed.
65
-
PingWaittime.Duration// The timeout for waiting for a ping from the client. After a timeout, the connection is closed.
66
-
PingEnabledbool// Whether the server should send ping messages to each client.
67
-
PingPeriodtime.Duration// The interval for sending ping messages to a client. This is only relevant if PingEnabled is true.
64
+
WriteWait time.Duration// The timeout for network write operations. After a timeout, the connection is closed.
65
+
PingWait time.Duration// The timeout for waiting for a ping from the client. After a timeout, the connection is closed.
66
+
PingPeriod time.Duration// The interval for sending ping messages to a client. If set to 0, no pings are sent.
67
+
PongWaittime.Duration// The timeout for waiting for a pong from the server. After a timeout, the connection is closed. Needs to be set, if server is configured to send ping messages.
68
68
}
69
69
70
70
// NewServerTimeoutConfig creates a default timeout configuration for a websocket endpoint.
@@ -73,10 +73,10 @@ type ServerTimeoutConfig struct {
73
73
// You may change fields arbitrarily and pass the struct to a SetTimeoutConfig method.
WriteWait time.Duration// The timeout for network write operations. After a timeout, the connection is closed.
90
90
HandshakeTimeout time.Duration// The timeout for the initial handshake to complete.
91
-
PongWait time.Duration// The timeout for waiting for a pong from the server. After a timeout, the connection is closed.
92
-
PingPeriod time.Duration
91
+
PongWait time.Duration// The timeout for waiting for a pong from the server. After a timeout, the connection is closed. Needs to be set, if client is configured to send ping messages.
92
+
PingPeriod time.Duration// The interval for sending ping messages to a server. If set to 0, no pings are sent.
93
93
RetryBackOffRepeatTimesint
94
94
RetryBackOffRandomRangeint
95
95
RetryBackOffWaitMinimum time.Duration
@@ -191,13 +191,12 @@ type PingConfig struct {
191
191
//
192
192
// No custom configuration functions are run. Overrides need to be applied externally.
0 commit comments