Module Udpv4_socket

type buffer = Cstruct.t
type ipaddr = Ipaddr.V4.t
type flow = Lwt_unix.file_descr
type +'a io = 'a Lwt.t
type ip = Ipaddr.V4.t option
type ipinput = unit Lwt.t
type callback = src:ipaddr -> dst:ipaddr -> src_port:int -> buffer -> unit io
type t = {
interface : Unix.inet_addr;
listen_fds : (Unix.inet_addr * int, Lwt_unix.file_descr) Stdlib.Hashtbl.t;
}
val get_udpv4_listening_fd : t -> int -> Lwt_unix.file_descr Lwt.t
type error = [
| `Sendto_failed
]
val pp_error : Stdlib.Format.formatter -> [< `Sendto_failed ] -> unit
val connect : ip -> t Lwt.t
val disconnect : 'a -> unit Lwt.t
val id : t -> Ipaddr.V4.t option
val input : listeners:'a -> 'b -> 'c Lwt.t
val write : ?⁠src_port:int -> dst:Ipaddr.V4.t -> dst_port:int -> t -> Cstruct.t -> (unit, [> `Sendto_failed ]) Stdlib.result Lwt.t