Module Noise_socket

type t
val init : name:string -> pattern:Noise.Pattern.t -> dh:Noise.Dh.t -> cipher:Noise.Cipher.t -> hash:Noise.Hash.t -> is_initiator:bool -> s:Noise.Private_key.t option -> rs:Noise.Public_key.t option -> e:Noise.Private_key.t option -> psk:Cstruct.t option -> pre_pub_keys:Noise.Public_key.t list -> t

initialize Noise Socket

see also Noise.Socket.make & Noise.Protocol.initialize

val write_handshake : t -> Cstruct.t -> Cstruct.t -> int -> (Cstruct.t, string) Stdlib.result
val read_handshake : t -> (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t -> (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t -> (Cstruct.t * Cstruct.t, string) Stdlib.result
val parse_handshake : t -> Cstruct.t -> (Cstruct.t * Cstruct.t, string) Stdlib.result
val write_msg : t -> Cstruct.t -> int -> (Cstruct.t, string) Stdlib.result
val read_msg : t -> (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t -> (Cstruct.t, string) Stdlib.result
val parse_msg : t -> Cstruct.t -> (Cstruct.t, string) Stdlib.result
module Parser : sig ... end