package core_unix

  1. Overview
  2. Docs
Unix-specific portions of Core

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.1.tar.gz
md5=9370dca36f518fcea046d2752e3de22b
sha512=c4e8ce9d5885ac8fa8d554a97e1857f3a1c933e0eb5dfd4fe874412b9d09e6d0a2973b644733855553f33f5c859719228f0e6aaf3a2b7eb5befb46fc513750de

doc/core_unix.iobuf_unix/Iobuf_unix/index.html

Module Iobuf_unixSource

module Unix := Core_unix
Sourcetype ok_or_eof =
  1. | Ok
  2. | Eof
Sourceval compare_ok_or_eof : ok_or_eof -> ok_or_eof -> int
Sourceval sexp_of_ok_or_eof : ok_or_eof -> Sexplib0.Sexp.t
Sourceval input : ([> Core.write ], Iobuf.seek) Iobuf.t -> Core.In_channel.t -> ok_or_eof

Iobuf has analogs of various Bigstring functions. These analogs advance by the amount written/read.

Sourceval read_assume_fd_is_nonblocking : ([> Core.write ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> Unix.Syscall_result.Unit.t
Sourceval pread_assume_fd_is_nonblocking : ([> Core.write ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> offset:int -> unit
Sourceval recvfrom_assume_fd_is_nonblocking : ([> Core.write ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> Unix.sockaddr
Sourcemodule Recvmmsg_context : sig ... end

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

recvmmsg_assume_fd_is_nonblocking fd context returns the number of context iobufs read into (or errno). fd must not block. THREAD_IO_CUTOFF is ignored.

EINVAL is returned if an Iobuf passed to Recvmmsg_context.create has its buf or limits changed.

Sourceval send_nonblocking_no_sigpipe : unit -> (([> Core.read ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> Unix.Syscall_result.Unit.t) Core.Or_error.t
Sourceval sendto_nonblocking_no_sigpipe : unit -> (([> Core.read ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> Unix.sockaddr -> Unix.Syscall_result.Unit.t) Core.Or_error.t
Sourcemodule Peek : sig ... end

Write from the iobuf to the specified channel without changing the iobuf window. Returns the number of bytes written.

Sourceval output : ([> Core.read ], Iobuf.seek) Iobuf.t -> Core.Out_channel.t -> unit

As Peek, but advances the window by the number of bytes written.

Sourceval write : ([> Core.read ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> unit
Sourceval write_assume_fd_is_nonblocking : ([> Core.read ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> unit
Sourceval pwrite_assume_fd_is_nonblocking : ([> Core.read ], Iobuf.seek) Iobuf.t -> Unix.File_descr.t -> offset:int -> unit
Sourcemodule In_channel_optimized : sig ... end

As similar APIs in In_channel, but using an intermediate Iobuf; considerably faster.

Expert

Sourcemodule Expert : sig ... end

The Expert module is for building efficient out-of-module Iobuf abstractions.

OCaml

Innovation. Community. Security.