Module Tcp.TRX

module TRX: sig .. end

type rcvd_pkt = int * Tcp.Pdu.t 
module Streambuf: Batteries.Set.Make(sig
type t = Tcp.TRX.rcvd_pkt 
val compare : Batteries.Int.t * 'a -> Batteries.Int.t * 'b -> int
end)
type tcp_trx = {
   trx : Tools.trx;
   close : unit -> unit;
   is_closed : unit -> bool;
}
type t = {
   mutable tcp_trx : tcp_trx;
   mutable src : Tcp.Port.t;
   mutable dst : Tcp.Port.t;
   mutable emit : Bitstring.bitstring -> unit;
   mutable recv : Bitstring.bitstring -> unit;
   mtu : int;
   isn : Tcp.SeqNum.t;
   mutable rcvd_isn : Tcp.SeqNum.t option;
   mutable closed : bool;
   mutable sent_fin : bool;
   mutable sent_pld : int;
   mutable sent_acked : int;
   mutable rcvd_pld : int;
   mutable rcvd_acked : int;
   mutable rcvd_pkts : Streambuf.t;
   mutable to_send : Bitstring.bitstring list;
   mutable unacked_tx : Streambuf.t;
   mutable rcvd_fin : bool;
   mutable cnx_established_cont : (tcp_trx option -> unit) option;
}
val is_closed : t -> unit -> bool
val int_of_bool : bool -> int
val (+/) : int32 -> int32 -> int32
val (-/) : int32 -> int32 -> int32
val next_seq_num : t -> Tcp.SeqNum.t
val next_ack_num : t -> Tcp.SeqNum.t option
val emit_one : t ->
?psh:bool ->
?rst:bool -> ?syn:bool -> ?fin:bool -> Bitstring.bitstring -> unit
val emit_multi : t -> Bitstring.bitstring -> unit
val delayed_ack : t -> unit
val establish_cnx : t -> bool -> unit
val try_really_rx : t -> unit
val drop_unacked_tx : t -> unit
val inqueue_pkt : t -> Tcp.Pdu.t -> unit
val is_established : t -> bool
val rx : t -> string * int * int -> unit
val try_really_tx : t -> unit
val close : t -> unit -> unit
val tx : t -> Bitstring.bitstring -> unit
val make : ?isn:Tcp.SeqNum.t -> ?mtu:int -> Tcp.Port.t -> Tcp.Port.t -> t
val may_timeout : t -> unit
val default_connect_timeout : Clock.Interval.t
val connect : ?timeout:Clock.Interval.t ->
t -> (tcp_trx option -> unit) -> unit