Set and get the interval for sending ping signals. 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.GOING_AWAY 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
.
Duration pingInterval
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-io/WebSocket/pingInterval.html