Module Uring.Msghdr

type t
val create : ?n_fds:int -> ?addr:Sockaddr.t -> Cstruct.t list -> t
  • deprecated Use Msghdr.create_recv instead
val create_recv : ?n_fds:int -> msg_name:bool -> Cstruct.t list -> t

create_recv ~msg_name:true buffs makes a new msghdr for recv_msg using the buffs for the underlying iovec.

Requires List.length buffs <= Uring.iov_max

  • parameter msg_name

    Whether to allocate space to receive the sender's address (see get_msg_name).

  • parameter n_fds

    Reserve space to receive this many FDs (default 0)

val get_fds : t -> Unix.file_descr list
val get_msg_name : t -> Unix.sockaddr

Get the sender address as an OCaml value. This must only be used after the operation to set it has succeeded.

  • raises Invalid_argument

    if t did not reserve space for the address.