package mm

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ringbuffer.MakeSource

Create a ringbuffer.

Parameters

module B : Buffer

Signature

Sourcetype buffer = B.t

A buffer of elements.

Sourcetype t

A ringbuffer.

Sourceval create : int -> t

Create a ringbuffer of given size.

Sourceval read_space : t -> int

Size of data available for reading.

Sourceval write_space : t -> int

Size of space available for writing.

Sourceval read_advance : t -> int -> unit

Drop data.

Sourceval write_advance : t -> int -> unit

Advance the write pointer.

Sourceval read : t -> buffer -> int -> int -> unit

Read data.

Sourceval peek : t -> buffer -> int -> int -> unit

Same as read but does not advance the read pointer.

Sourceval write : t -> buffer -> int -> int -> unit

Write data.

Sourceval transmit : t -> (buffer -> int -> int -> int) -> int

Read all the data in the ringbuffer.

OCaml

Innovation. Community. Security.