Crdt.Io_intf.Mock
crdt · API reference
type t = {
mutable input : bytes;
mutable input_pos : int;
output : Buffer.t;
mutable closed : bool;
}Mock connection with input/output buffers
val create : ?input:bytes -> unit -> tCreate a mock connection with given input data
val set_input : t -> string -> unitSet the input data for reading
val get_output : t -> stringGet all output written so far
val clear_output : t -> unitClear the output buffer
val run : t -> (unit -> 'a) -> 'aRun a function with mock IO handler