package tiny_httpd

  1. Overview
  2. Docs

Module Tiny_httpd_bufSource

Simple buffer.

These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests.

  • since 0.12
Sourcetype t
Sourceval size : t -> int
Sourceval clear : t -> unit
Sourceval create : ?size:int -> unit -> t
Sourceval contents : t -> string
Sourceval bytes_slice : t -> bytes

Access underlying slice of bytes.

  • since 0.5
Sourceval contents_and_clear : t -> string

Get contents of the buffer and clear it.

  • since 0.5
Sourceval add_bytes : t -> bytes -> int -> int -> unit

Append given bytes slice to the buffer.

  • since 0.5
OCaml

Innovation. Community. Security.