package tcpip

  1. Overview
  2. Docs
OCaml TCP/IP networking stack, used in MirageOS

Install

dune-project
 Dependency

Authors

Maintainers

Sources

tcpip-8.1.0.tbz
sha256=86ba5d92f9078bddc65312f63b5f4ce34fd2570d765433b23a226ab84d75a9c0
sha512=a348a597cf4ba1e19f7fc97d6d1cb980711d09b6944efacba91d23daf419fc8cb8a83a2d263bcc7b96ff5d37ad5dbfa4a3879db9ac4c0b35528b80acb87cf8f7

doc/tcpip.tcp/Tcp/Keepalive/index.html

Module Tcp.KeepaliveSource

TCP keepalives.

A TCP implementation may send "keep-alives" (empty TCP ACKs with the sequence number set to one less than the current sequence number for the connection) in order to provoke the peer to respond with an ACK of the current sequence number. If the peer doesn't recognise the connection (e.g. because the connection state has been dropped) then it will return a RST; if the peer (or the network in-between) fails to respond to a configured number of repeated probes then the connection is assumed to be lost.

Sourcetype action = [
  1. | `SendProbe
    (*

    we should send a keep-alive now

    *)
  2. | `Wait of Duration.t
    (*

    sleep for a given number of nanoseconds

    *)
  3. | `Close
    (*

    connection should be closed

    *)
]

An I/O action to perform

Sourcetype state

State of a current connection

Sourceval alive : state

An alive connection

Sourceval next : configuration:Tcpip.Tcp.Keepalive.t -> ns:int64 -> state -> action * state

next ~configuration ~ns state returns the action we should take given that we last received a packet ns nanoseconds ago and the new state of the connection

Sourcemodule Make (T : Mirage_time.S) (Clock : Mirage_clock.MCLOCK) : sig ... end
OCaml

Innovation. Community. Security.