Up

Module Recvmmsg_context

recvmmsg's context comprises data needed by the system call. Setup can be expensive, particularly for many buffers.

NOTE: Unlike most system calls involving Iobufs, the lo offset is not respected. Instead, the Iobuf is implicity reset (i.e. lo <- lo_min and hi <- hi_max) prior to reading and a flip_lo applied afterward. This is to prevent the memory-unsafe case where an iobuf's lo pointer is advanced and recvmmsg attempts to copy into memory exceeding the underlying bigstring's capacity. If any of the returned Iobufs have had their underlying bigstring or limits changed (e.g. through a call to set_bounds_and_buffer or narrow_lo), the call will fail with EINVAL.

Signature

type ('rw, 'seek) iobuf
type t
val create : ([> ], seek) iobuf array -> t

Do not change these Iobuf's bufs or limits before calling recvmmsg_assume_fd_is_nonblocking.