pingInterval property
The interval between ping signals.
A ping message is sent every pingInterval, starting at the first pingInterval after a new value has been assigned or a pong message has been received. If a ping message is not answered by a pong message from the peer, the WebSocket
is assumed disconnected and the connection is closed with a WebSocketStatus.goingAway close code. When a ping signal is sent, the pong message must be received within pingInterval.
There are never two outstanding pings at any given time, and the next ping timer starts when the pong is received.
Set the pingInterval to null
to disable sending ping messages.
The default value is null
.
Implementation
Duration? pingInterval;
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-io/WebSocket/pingInterval.html