ring.websocket.keepalive

websocket-keepalive-response

(websocket-keepalive-response response)(websocket-keepalive-response response options)
Adds a periodic ping to a WebSocket response; returns the response unaltered
otherwise. See wrap-websocket-keepalive for the available options.

wrap-websocket-keepalive

(wrap-websocket-keepalive handler)(wrap-websocket-keepalive handler options)
Middleware that adds a periodic ping to WebSocket responses, in order to
stop them from timing out. Takes the following options:

  :period   - the time in milliseconds between pings (default 20000)
  :executor - a custom ScheduledExecutorService to handle scheduling