package mnet

  1. Overview
  2. Docs
An implementation of TCP (Transmission Control Protocol) in OCaml for Miou & Solo5

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mnet-0.0.9.tbz
sha256=f406db87adc00e711817f83ce3c89b8dee14edac36aa3e90446800f37173efdc
sha512=446650dad4ecc587b3b1c76a035f9aebb4884494352cf704a6660f87e3073931034547f7d30709c63a9d2930ced3d10ac1a12b4745abb06c1164d7c749d3b513

doc/mnet.fragments/Fragments/Make/index.html

Module Fragments.MakeSource

Parameters

Signature

Sourcetype t

The type of a mutable cache.

Sourceval create : ?to_expire:int -> unit -> t

create ?to_expire () creates a new cache where fragments are kept until to_expire nanoseconds (defaults to 10s).

Sourceval insert : now:int -> t -> Key.t -> ?last:bool -> off:int -> len:int -> SBstr.t -> (Key.t * payload) option

insert ~now cache key ?last ~off ~len slice inserts a new slice into the given cache identified by the given key. The user can specify a sub-view of the given slice and must informs if the payload is the last one or not with the last value (defaults to false).

If the cache is able to reassemble packets identified by key or if the given slice is not fragmented, it returns the key and the data. Otherwise, it returns None.