Module Keepalive.Make

Parameters

module T : Mirage_time.S
module Clock : Mirage_clock.MCLOCK

Signature

type t

A keep-alive timer

val create : Tcpip.Tcp.Keepalive.t -> ([ `SendProbe | `Close ] -> unit Lwt.t) -> t

create configuration f clock returns a keep-alive timer which will call f in future depending on both the configuration and any calls to refresh

val refresh : t -> unit

refresh t marks the connection t as alive. This should be called when packets are received.