package awa

  1. Overview
  2. Docs
type state =
  1. | Open
  2. | Sent_close
type channel_end = {
  1. id : int32;
  2. win : int32;
  3. max_pkt : int32;
}
type channel = {
  1. us : channel_end;
  2. them : channel_end;
  3. state : state;
  4. tosend : Cstruct.t;
}
val compare : channel -> channel -> int
type t = channel
module Ordered : sig ... end
val make_end : int32 -> int32 -> int32 -> channel_end
val make : us:channel_end -> them:channel_end -> channel
val input_data : channel -> Cstruct.t -> (channel * Cstruct.t * Ssh.message option, string) result
val output_data : channel -> Cstruct.t -> (channel * Ssh.message list, string) result
val adjust_window : channel -> int32 -> (channel * Ssh.message list, string) result
module Channel_map : sig ... end
val empty_db : 'a Channel_map.t
val is_empty : 'a Channel_map.t -> bool
val next_free : 'a Channel_map.t -> int32 option
val add : id:int32 -> win:int32 -> max_pkt:int32 -> channel Channel_map.t -> (channel * channel Channel_map.t, [> `No_channels_left ]) result
val lookup : Channel_map.key -> 'a Channel_map.t -> 'a option
val id : channel -> int32
val their_id : channel -> int32
OCaml

Innovation. Community. Security.