package tcpip

  1. Overview
  2. Docs

Pre-transmission queue

Parameters

Signature

type ('a, 'b) xmit = flags:tx_flags -> wnd:Window.t -> options:Options.t list -> seq:Sequence.t -> Cstruct.t -> ('a, 'b) Stdlib.result Lwt.t
type t

Queue of pre-transmission segments

val create : xmit:('a, 'b) xmit -> wnd:Window.t -> state:State.t -> rx_ack:Sequence.t Lwt_mvar.t -> tx_ack:(Sequence.t * int) Lwt_mvar.t -> tx_wnd_update:int Lwt_mvar.t -> t * unit Lwt.t
val output : ?flags:tx_flags -> ?options:Options.t list -> t -> Cstruct.t -> unit Lwt.t

Queue a segment for transmission. May block if:

  • There is no transmit window available.
  • The wire transmit function blocks.

The transmitter should check that the segment size will not be greater than the transmit window.

OCaml

Innovation. Community. Security.