Unix_syscalls
provides an interface to many of the functions in OCaml's standard
Unix module. It uses a deferred in the return type of functions that would block.
The idea is that in an Async program one does not use the standard Unix module, since
in doing so one could accidentally block the whole program.
There are also a number of cosmetic changes (e.g. polymorphic variants) and other
improvements (e.g. phantom types on sockets) over the standard Unix module.
#
module Syscall_result = Core.Std.Unix.Syscall_result
#
module Exit : module type of Core.Std.Unix.Exit
#
module Exit_or_signal : module type of Core.Std.Unix.Exit_or_signal
#
module Exit_or_signal_or_stop : module type of Core.Std.Unix.Exit_or_signal_or_stop
#
val system_exn : string -> unit Import.Deferred.t
#
val getpid : unit -> Core.Std.Pid.t
#
val getppid : unit -> Core.Std.Pid.t option
#
val getppid_exn : unit -> Core.Std.Pid.t
#
val this_process_became_child_of_init : ?poll_delay:Core.Std.Time.Span.t
-> unit
-> unit Import.Deferred.t
this_process_became_child_of_init
returns a deferred that becomes determined when
the current process becomes a child of init(8). This is useful to determine if one's
parent has died, because in that case init will becomes one's parent.
See Linux_ext.pr_set_pdeathsig : Signal.t -> unit
for related way to get information
about parent death.
Poll_delay controls how often to check
#
val cores : (unit
-> int Import.Deferred.t) Core.Std.Or_error.t
cores ()
Returns the number of cores
#
type open_flag = [
| `Rdonly
| `Wronly
| `Rdwr
| `Nonblock
| `Append
| `Creat
| `Trunc
| `Excl
| `Noctty
| `Dsync
| `Sync
| `Rsync
]
#
val openfile : ?perm:
file_perm -> ?close_on_exec:bool
-> string
-> mode:
open_flag list
-> Fd.
t Import.Deferred.t
#
val with_file : ?exclusive:[
| `Read
| `Write
]
-> ?perm:
file_perm -> string
-> mode:
open_flag list
-> f:(
Fd.
t -> 'a Import.Deferred.t)
-> 'a Import.Deferred.t
with_file file ~mode ~perm ~f ?exclusive
opens file
, and applies f
to the
resulting file descriptor. When the result of f
becomes determined, it closes the
descriptor and returns the result of f
. If exclusive
is supplied, then the file
descriptor is locked before calling f
and unlocked after calling f
.
#
module Open_flags : module type of Core.Std.Unix.Open_flags
#
val fcntl_getfl :
Fd.
t -> Open_flags.t Import.Deferred.t
fcntl_getfl
and fcntl_setf
are deferred wrappers around the corresponding
functions in Core.Unix
for accessing the open-file-descriptor table.
#
val close : ?should_close_file_descriptor:bool
-> Fd.
t -> unit Import.Deferred.t
close fd
closes the file descriptor fd
, and raises an exception if fd
has
already been closed.
In some situations, one may need to cause Async to release an fd that it is managing
without closing the underlying file descriptor. In that case, one should supply
~should_close_file_descriptor:false
, which will skip the underlying close() system
call.
#
val lseek :
Fd.
t -> int64
-> mode:[<
| `Set
| `Cur
| `End
]
-> int64 Import.Deferred.t
#
val truncate : string -> len:int64 -> unit Import.Deferred.t
#
val ftruncate :
Fd.
t -> len:int64
-> unit Import.Deferred.t
#
val fsync :
Fd.
t -> unit Import.Deferred.t
#
val fdatasync :
Fd.
t -> unit Import.Deferred.t
#
val sync : unit -> unit Import.Deferred.t
#
val lockf : ?len:Core.Std.Int64.t
-> Fd.
t -> [
| `Read
| `Write
]
-> unit Import.Deferred.t
lockf fd read_or_write ?len
exclusively locks for reading/writing the section of the
open file fd
specified by the current file position and len
(see man lockf). It
returns when the lock has been acquired. It raises if fd
is closed.
#
val try_lockf : ?len:Core.Std.Int64.t
-> Fd.
t -> [
| `Read
| `Write
]
-> bool
try_lockf fd read_or_write ?len
attempts to exclusively lock for reading/writing the
section of the open file fd
specified by the current file position and len
(see
man lockf). It returns true
if it acquired the lock. It raises if fd
is
closed.
#
val test_lockf : ?len:Core.Std.Int64.t
-> Fd.
t -> bool
lockf_is_locked fd ?len
checks the lock on section of the open file fd
specified
by the current file position and len
(see man lockf). If the section is unlocked or
locked by this process, it returns true, else it returns false. It raises if fd
is
closed.
#
val unlockf : ?len:Core.Std.Int64.t
-> Fd.
t -> unit
unlockf fd ?len
unlocks the section of the open file fd
specified by the current
file position and len
(see man lockf). It raises if fd
is closed.
#
module File_kind : sig
#
type t = [
| `File
| `Directory
| `Char
| `Block
| `Link
| `Fifo
| `Socket
]
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val __t_of_sexp__ : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
end
#
module Stats : sig
#
type t = {
| : int | ; | | | |
| : int | ; | | | |
| : File_kind.t | ; | | | |
| : file_perm | ; | | | |
| : int | ; | | | |
| : int | ; | | | |
| : int | ; | | | |
| : int | ; | | | |
| : int64 | ; | | | |
| : Core.Std.Time.t | ; | | | |
| : Core.Std.Time.t | ; | | | |
| : Core.Std.Time.t | ; | | | |
}
#
val ctime :
t -> Core.Std.Time.t
#
val mtime :
t -> Core.Std.Time.t
#
val atime :
t -> Core.Std.Time.t
#
module Fields : sig
#
val names : string list
#
val ctime : (
t, Core.Std.Time.t) Fieldslib.Field.t
#
val mtime : (
t, Core.Std.Time.t) Fieldslib.Field.t
#
val atime : (
t, Core.Std.Time.t) Fieldslib.Field.t
#
val size : (
t, int64) Fieldslib.Field.t
#
val rdev : (
t, int) Fieldslib.Field.t
#
val gid : (
t, int) Fieldslib.Field.t
#
val uid : (
t, int) Fieldslib.Field.t
#
val nlink : (
t, int) Fieldslib.Field.t
#
val ino : (
t, int) Fieldslib.Field.t
#
val dev : (
t, int) Fieldslib.Field.t
#
val fold : init:'acc__
-> dev:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> ino:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> kind:('acc__
-> (
t,
File_kind.
t) Fieldslib.Field.t
-> 'acc__)
-> perm:('acc__
-> (
t,
file_perm) Fieldslib.Field.t
-> 'acc__)
-> nlink:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> uid:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> gid:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> rdev:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> size:('acc__
-> (
t, int64) Fieldslib.Field.t
-> 'acc__)
-> atime:('acc__
-> (
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'acc__)
-> mtime:('acc__
-> (
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'acc__)
-> ctime:('acc__
-> (
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'acc__)
-> 'acc__
#
val make_creator : dev:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> ino:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> kind:((
t,
File_kind.
t) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> File_kind.
t) * 'compile_acc__)
-> perm:((
t,
file_perm) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> file_perm) * 'compile_acc__)
-> nlink:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> uid:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> gid:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> rdev:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> size:((
t, int64) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int64) * 'compile_acc__)
-> atime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> Core.Std.Time.t) * 'compile_acc__)
-> mtime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> Core.Std.Time.t) * 'compile_acc__)
-> ctime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> Core.Std.Time.t) * 'compile_acc__)
-> 'compile_acc__
-> ('input__
-> t) * 'compile_acc__
#
val create : dev:int
-> ino:int
-> kind:
File_kind.
t -> perm:
file_perm -> nlink:int
-> uid:int
-> gid:int
-> rdev:int
-> size:int64
-> atime:Core.Std.Time.t
-> mtime:Core.Std.Time.t
-> ctime:Core.Std.Time.t
-> t
#
val map : dev:((
t, int) Fieldslib.Field.t
-> int)
-> ino:((
t, int) Fieldslib.Field.t
-> int)
-> kind:((
t,
File_kind.
t) Fieldslib.Field.t
-> File_kind.
t)
-> perm:((
t,
file_perm) Fieldslib.Field.t
-> file_perm)
-> nlink:((
t, int) Fieldslib.Field.t
-> int)
-> uid:((
t, int) Fieldslib.Field.t
-> int)
-> gid:((
t, int) Fieldslib.Field.t
-> int)
-> rdev:((
t, int) Fieldslib.Field.t
-> int)
-> size:((
t, int64) Fieldslib.Field.t
-> int64)
-> atime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> Core.Std.Time.t)
-> mtime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> Core.Std.Time.t)
-> ctime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> Core.Std.Time.t)
-> t
#
val iter : dev:((
t, int) Fieldslib.Field.t
-> unit)
-> ino:((
t, int) Fieldslib.Field.t
-> unit)
-> kind:((
t,
File_kind.
t) Fieldslib.Field.t
-> unit)
-> perm:((
t,
file_perm) Fieldslib.Field.t
-> unit)
-> nlink:((
t, int) Fieldslib.Field.t
-> unit)
-> uid:((
t, int) Fieldslib.Field.t
-> unit)
-> gid:((
t, int) Fieldslib.Field.t
-> unit)
-> rdev:((
t, int) Fieldslib.Field.t
-> unit)
-> size:((
t, int64) Fieldslib.Field.t
-> unit)
-> atime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> unit)
-> mtime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> unit)
-> ctime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> unit)
-> unit
#
val for_all : dev:((
t, int) Fieldslib.Field.t
-> bool)
-> ino:((
t, int) Fieldslib.Field.t
-> bool)
-> kind:((
t,
File_kind.
t) Fieldslib.Field.t
-> bool)
-> perm:((
t,
file_perm) Fieldslib.Field.t
-> bool)
-> nlink:((
t, int) Fieldslib.Field.t
-> bool)
-> uid:((
t, int) Fieldslib.Field.t
-> bool)
-> gid:((
t, int) Fieldslib.Field.t
-> bool)
-> rdev:((
t, int) Fieldslib.Field.t
-> bool)
-> size:((
t, int64) Fieldslib.Field.t
-> bool)
-> atime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> bool)
-> mtime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> bool)
-> ctime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> bool)
-> bool
#
val exists : dev:((
t, int) Fieldslib.Field.t
-> bool)
-> ino:((
t, int) Fieldslib.Field.t
-> bool)
-> kind:((
t,
File_kind.
t) Fieldslib.Field.t
-> bool)
-> perm:((
t,
file_perm) Fieldslib.Field.t
-> bool)
-> nlink:((
t, int) Fieldslib.Field.t
-> bool)
-> uid:((
t, int) Fieldslib.Field.t
-> bool)
-> gid:((
t, int) Fieldslib.Field.t
-> bool)
-> rdev:((
t, int) Fieldslib.Field.t
-> bool)
-> size:((
t, int64) Fieldslib.Field.t
-> bool)
-> atime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> bool)
-> mtime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> bool)
-> ctime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> bool)
-> bool
#
val to_list : dev:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> ino:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> kind:((
t,
File_kind.
t) Fieldslib.Field.t
-> 'elem__)
-> perm:((
t,
file_perm) Fieldslib.Field.t
-> 'elem__)
-> nlink:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> uid:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> gid:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> rdev:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> size:((
t, int64) Fieldslib.Field.t
-> 'elem__)
-> atime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'elem__)
-> mtime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'elem__)
-> ctime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> 'elem__)
-> 'elem__ list
#
val map_poly : ([<
| `Read
| `Set_and_create
],
t, 'x0) Fieldslib.Field.user
-> 'x0 list
#
module Direct : sig
#
val iter :
t -> dev:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> ino:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> kind:((
t,
File_kind.
t) Fieldslib.Field.t
-> t -> File_kind.
t -> unit)
-> perm:((
t,
file_perm) Fieldslib.Field.t
-> t -> file_perm -> unit)
-> nlink:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> uid:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> gid:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> rdev:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> size:((
t, int64) Fieldslib.Field.t
-> t -> int64
-> unit)
-> atime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> t -> Core.Std.Time.t
-> unit)
-> mtime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> t -> Core.Std.Time.t
-> unit)
-> ctime:((
t, Core.Std.Time.t) Fieldslib.Field.t
-> t -> Core.Std.Time.t
-> unit)
-> unit
#
val fold :
t -> init:'acc__
-> dev:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> ino:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> kind:('acc__
-> (
t,
File_kind.
t) Fieldslib.Field.t
-> t -> File_kind.
t -> 'acc__)
-> perm:('acc__
-> (
t,
file_perm) Fieldslib.Field.t
-> t -> file_perm -> 'acc__)
-> nlink:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> uid:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> gid:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> rdev:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> size:('acc__
-> (
t, int64) Fieldslib.Field.t
-> t -> int64
-> 'acc__)
-> atime:('acc__
-> (
t, Core.Std.Time.t) Fieldslib.Field.t
-> t -> Core.Std.Time.t
-> 'acc__)
-> mtime:('acc__
-> (
t, Core.Std.Time.t) Fieldslib.Field.t
-> t -> Core.Std.Time.t
-> 'acc__)
-> ctime:('acc__
-> (
t, Core.Std.Time.t) Fieldslib.Field.t
-> t -> Core.Std.Time.t
-> 'acc__)
-> 'acc__
end
end
#
val to_string :
t -> string
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
end
#
val stat : string
-> Stats.
t Import.Deferred.t
#
val lstat : string
-> Stats.
t Import.Deferred.t
#
val unlink : string -> unit Import.Deferred.t
#
val remove : string -> unit Import.Deferred.t
#
val rename : src:string -> dst:string -> unit Import.Deferred.t
#
val link : ?force:bool -> target:string -> link_name:string -> unit -> unit Import.Deferred.t
#
val chmod : string
-> perm:
file_perm -> unit Import.Deferred.t
#
val chown : string -> uid:int -> gid:int -> unit Import.Deferred.t
#
val fchown :
Fd.
t -> uid:int
-> gid:int
-> unit Import.Deferred.t
#
val access : string
-> [
| `Read
| `Write
| `Exec
| `Exists
] list
-> (unit, exn) Core.Std.Result.t Import.Deferred.t
#
val access_exn : string
-> [
| `Read
| `Write
| `Exec
| `Exists
] list
-> unit Import.Deferred.t
#
val set_close_on_exec :
Fd.
t -> unit
#
val clear_close_on_exec :
Fd.
t -> unit
#
val mkdir : ?p:unit
-> ?perm:
file_perm -> string
-> unit Import.Deferred.t
#
val rmdir : string -> unit Import.Deferred.t
#
val chdir : string -> unit Import.Deferred.t
#
val getcwd : unit -> string Import.Deferred.t
#
val chroot : string -> unit Import.Deferred.t
#
type dir_handle = Core.Std.Unix.dir_handle
#
val pipe : Core.Std.Info.t
-> ([
] * [
]) Import.Deferred.t
The info
supplied to pipe is debugging information that will be included in the
returned Fd
s.
#
val mkfifo : ?perm:
file_perm -> string
-> unit Import.Deferred.t
Create a named pipe with the given permissions.
#
val symlink : src:string -> dst:string -> unit Import.Deferred.t
#
val readlink : string -> string Import.Deferred.t
#
val mkstemp : string
-> (string *
Fd.
t) Import.Deferred.t
mkstemp prefix
creates and opens a unique temporary file with prefix
,
automatically appending a suffix of six random characters to make the name unique.
Unlike C's mkstemp
, prefix
should not include six X's at the end.
Raises Unix_error
on errors.
#
val mkdtemp : string -> string Import.Deferred.t
#
type process_times = Core.Std.Unix.process_times = {
| : float | ; | (* | User time for the process | *) |
| : float | ; | (* | System time for the process | *) |
| : float | ; | (* | User time for the children processes | *) |
| : float | ; | (* | System time for the children processes | *) |
}
#
type tm = Core.Std.Unix.tm = {
| : int | ; | (* | Seconds 0..59 | *) |
| : int | ; | (* | Minutes 0..59 | *) |
| : int | ; | (* | Hours 0..23 | *) |
| : int | ; | (* | Day of month 1..31 | *) |
| : int | ; | (* | Month of year 0..11 | *) |
| : int | ; | (* | Year - 1900 | *) |
| : int | ; | (* | Day of week (Sunday is 0) | *) |
| : int | ; | (* | Day of year 0..365 | *) |
| : bool | ; | (* | Daylight time savings in effect | *) |
}
#
val time : unit -> float
#
val gettimeofday : unit -> float
#
val localtime : float
-> tm
#
val mktime :
tm -> float *
tm
#
val utimes : string -> access:float -> modif:float -> unit Import.Deferred.t
#
val environment : unit -> string array
#
val getenv : string -> string option
#
val getenv_exn : string -> string
#
val putenv : key:string -> data:string -> unit
#
val unsetenv : string -> unit
#
val fork_exec : prog:string
-> args:string list
-> ?use_path:bool
-> ?env:[
| Core.Std.Unix.env
| `Replace_raw of string list
]
-> unit
-> Core.Std.Pid.t Import.Deferred.t
fork_exec ~prog ~args ?path ?env
forks and execs prog
with args
, and returns the
child pid. If use_path = true
(the default) and prog
doesn't contain a slash,
then fork_exec
searches the PATH environment variable for prog
. If env
is
supplied, it specifies the environment when prog
is executed.
If env
contains multiple bindings for the same variable, the last takes precedence.
In the case of `Extend
, bindings in env
take precedence over the existing
environment. See Unix.exec.
#
type wait_on = [
| `Any
| `Group of Core.Std.Pid.t
| `My_group
| `Pid of Core.Std.Pid.t
]
#
val waitpid : Core.Std.Pid.t
-> Exit_or_signal.t Import.Deferred.t
waitpid pid
returns a deferred that becomes determined with the child's exit
status, when the child process with process id pid
exits. waitpid_exn
is like
waitpid
, except the result only becomes determined if the child exits with status
zero; it raises if the child terminates win any other way.
#
val waitpid_exn : Core.Std.Pid.t -> unit Import.Deferred.t
#
module Inet_addr : sig
#
type t = Core.Std.Unix.Inet_addr.t
include Core.Std.Comparable.S
with type t :=
t
#
val of_string : string
-> t
#
val to_string :
t -> string
#
val inet4_addr_of_int32 : Core.Std.Int32.t
-> t
#
val inet4_addr_to_int32_exn :
t -> Core.Std.Int32.t
#
val of_string_or_getbyname : string
-> t Import.Deferred.t
of_string_or_getbyname hostname
does a DNS lookup of hostname and returns the
resulting IP address. The implemenation sequentializes all calls so that only a
single call is active at a time. The is because we've observed thread safety issues
with certain versions of winbind using "wins" name resolution.
#
val compare :
t -> t -> int
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
#
val bin_t :
t Core.Std.Bin_prot.Type_class.t
#
val bin_read_t :
t Core.Std.Bin_prot.Read.reader
#
val __bin_read_t__ : (int
-> t) Core.Std.Bin_prot.Read.reader
#
val bin_reader_t :
t Core.Std.Bin_prot.Type_class.reader
#
val bin_size_t :
t Core.Std.Bin_prot.Size.sizer
#
val bin_write_t :
t Core.Std.Bin_prot.Write.writer
#
val bin_writer_t :
t Core.Std.Bin_prot.Type_class.writer
end
#
module Cidr : module type of Core.Std.Unix.Cidr
#
module Protocol_family : sig
#
type t = Core.Std.Unix.Protocol_family.t
end
#
val socketpair : unit
-> Fd.
t *
Fd.
t
#
module Socket : sig
#
module Address : sig
#
module Unix : sig
#
type t = [
| `Unix of string
]
#
val to_string :
t -> string
#
val compare :
t -> t -> int
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val __t_of_sexp__ : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
#
val bin_t :
t Core.Std.Bin_prot.Type_class.t
#
val bin_read_t :
t Core.Std.Bin_prot.Read.reader
#
val __bin_read_t__ : (int
-> t) Core.Std.Bin_prot.Read.reader
#
val bin_reader_t :
t Core.Std.Bin_prot.Type_class.reader
#
val bin_size_t :
t Core.Std.Bin_prot.Size.sizer
#
val bin_write_t :
t Core.Std.Bin_prot.Write.writer
#
val bin_writer_t :
t Core.Std.Bin_prot.Type_class.writer
end
#
module Inet : sig
#
val create_bind_any : port:int
-> t
#
val to_string :
t -> string
#
val to_host_and_port :
t -> Core.Std.Host_and_port.t
#
val compare :
t -> t -> int
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val __t_of_sexp__ : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
#
val bin_t :
t Core.Std.Bin_prot.Type_class.t
#
val bin_read_t :
t Core.Std.Bin_prot.Read.reader
#
val __bin_read_t__ : (int
-> t) Core.Std.Bin_prot.Read.reader
#
val bin_reader_t :
t Core.Std.Bin_prot.Type_class.reader
#
val bin_size_t :
t Core.Std.Bin_prot.Size.sizer
#
val bin_write_t :
t Core.Std.Bin_prot.Write.writer
#
val bin_writer_t :
t Core.Std.Bin_prot.Type_class.writer
end
#
val to_string : [<
]
-> string
#
val to_sockaddr : [<
]
-> Core.Std.Unix.sockaddr
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val __t_of_sexp__ : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
#
val bin_t :
t Core.Std.Bin_prot.Type_class.t
#
val bin_read_t :
t Core.Std.Bin_prot.Read.reader
#
val __bin_read_t__ : (int
-> t) Core.Std.Bin_prot.Read.reader
#
val bin_reader_t :
t Core.Std.Bin_prot.Type_class.reader
#
val bin_size_t :
t Core.Std.Bin_prot.Size.sizer
#
val bin_write_t :
t Core.Std.Bin_prot.Write.writer
#
val bin_writer_t :
t Core.Std.Bin_prot.Type_class.writer
end
#
module Family : sig
#
type 'a t
constraint 'a = [<
]
#
val to_string : 'a
t -> string
end
#
type ('a, 'b) t
constraint 'a = [<
| `Unconnected
| `Bound
| `Passive
| `Active
]
constraint 'b = [<
]
Sockets have a phantom type parameter that tracks the state of the socket
in order to eliminate certain errors in which socket functions are called
in the wrong order. Initially, a socket is `Unconnected. As various
socket functions are called, they return a socket with a new phantom state.
Here is a chart of the allowed state transitions.
Unconnected ---connect--> Active
|
| ---bind--> Bound ---listen--> Passive ---accept---> Active
|
| ---connect--> Active
#
module Type : sig
#
type 'a t
constraint 'a = [<
]
#
val sexp_of_t : ('a
-> Sexplib.Sexp.t)
-> 'a
t -> Sexplib.Sexp.t
end
#
val create : 'addr
Type.
t -> ([
| `Unconnected
], 'addr)
t
#
val connect : ([<
| `Unconnected
| `Bound
], 'addr)
t -> 'addr
-> ([
| `Active
], 'addr)
t Import.Deferred.t
#
val connect_interruptible : ([<
| `Unconnected
| `Bound
], 'addr)
t -> 'addr
-> interrupt:unit Import.Deferred.t
-> [
| `Ok
of ([
| `Active
], 'addr)
t| `Interrupted
] Import.Deferred.t
#
val bind : ?reuseaddr:bool
-> ([
| `Unconnected
], 'addr)
t -> 'addr
-> ([
| `Bound
], 'addr)
t Import.Deferred.t
bind socket addr
sets close_on_exec for the fd of socket
.
#
val listen : ?max_pending_connections:int
-> ([
| `Bound
], 'addr)
t -> ([
| `Passive
], 'addr)
t
#
val accept : ([
| `Passive
], 'addr)
t -> [
| `Ok
of ([
| `Active
], 'addr)
t * 'addr
| `Socket_closed
] Import.Deferred.t
#
val accept_interruptible : ([
| `Passive
], 'addr)
t -> interrupt:unit Import.Deferred.t
-> [
| `Ok
of ([
| `Active
], 'addr)
t * 'addr
| `Socket_closed
| `Interrupted
] Import.Deferred.t
#
val shutdown : ('a, 'addr)
t -> [
| `Receive
| `Send
| `Both
]
-> unit
#
val fd : ('a, 'addr)
t -> Fd.
t
#
val of_fd :
Fd.
t -> 'addr
Type.
t -> ('a, 'addr)
t
#
val getsockname : ('a, 'addr)
t -> 'addr
#
val getpeername : ('a, 'addr)
t -> 'addr
#
module Opt : sig
#
val linger : int option
t
#
val to_string : 'a
t -> string
end
#
val getopt : ('a, 'addr)
t -> 'c
Opt.
t -> 'c
#
val setopt : ('a, 'addr)
t -> 'c
Opt.
t -> 'c
-> unit
#
val mcast_join : ?ifname:string
-> ?source:
Inet_addr.
t -> ('a, 'addr)
t -> 'addr
-> unit
#
val mcast_leave : ?ifname:string
-> ('a, 'addr)
t -> 'addr
-> unit
#
val bind_to_interface_exn : (([
| `Unconnected
], _)
t -> [
| `Any
| `Interface_name of string
]
-> unit) Core.Std.Or_error.t
bind_to_interface_exn t (`Interface_name "eth0")
restricts messages from being
received or sent on interfaces other than eth0
. See
Linux_ext.bind_to_interface.
Typically, one would use this function for very specific non-multicast requirements.
For similar functionality when using multicast, see Core_unix.mcast_set_ifname.
#
val sexp_of_t : ('a
-> Sexplib.Sexp.t)
-> ('b
-> Sexplib.Sexp.t)
-> ('a, 'b)
t -> Sexplib.Sexp.t
end
#
val bind_to_interface_exn : (
Fd.
t -> [
| `Any
| `Interface_name of string
]
-> unit) Core.Std.Or_error.t
#
module Host : sig
#
type t = Core.Std.Unix.Host.t = {
}
#
val getbyname : string
-> t option Import.Deferred.t
#
val getbyname_exn : string
-> t Import.Deferred.t
#
val have_address_in_common :
t -> t -> bool
end
#
type socket_domain = Core.Std.Unix.socket_domain =
#
type socket_type = Core.Std.Unix.socket_type =
#
type sockaddr = Core.Std.Unix.sockaddr =
#
module Addr_info : sig
#
type t = Core.Std.Unix.addr_info = {
}
#
type getaddrinfo_option = Core.Std.Unix.getaddrinfo_option =
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
#
val bin_t :
t Core.Std.Bin_prot.Type_class.t
#
val bin_read_t :
t Core.Std.Bin_prot.Read.reader
#
val __bin_read_t__ : (int
-> t) Core.Std.Bin_prot.Read.reader
#
val bin_reader_t :
t Core.Std.Bin_prot.Type_class.reader
#
val bin_size_t :
t Core.Std.Bin_prot.Size.sizer
#
val bin_write_t :
t Core.Std.Bin_prot.Write.writer
#
val bin_writer_t :
t Core.Std.Bin_prot.Type_class.writer
#
val __bin_read_getaddrinfo_option__ : (int
-> getaddrinfo_option) Core.Std.Bin_prot.Read.reader
end
#
module Name_info : sig
#
type t = Core.Std.Unix.name_info = {
}
#
type getnameinfo_option = Core.Std.Unix.getnameinfo_option =
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
#
val bin_t :
t Core.Std.Bin_prot.Type_class.t
#
val bin_read_t :
t Core.Std.Bin_prot.Read.reader
#
val __bin_read_t__ : (int
-> t) Core.Std.Bin_prot.Read.reader
#
val bin_reader_t :
t Core.Std.Bin_prot.Type_class.reader
#
val bin_size_t :
t Core.Std.Bin_prot.Size.sizer
#
val bin_write_t :
t Core.Std.Bin_prot.Write.writer
#
val bin_writer_t :
t Core.Std.Bin_prot.Type_class.writer
#
val __bin_read_getnameinfo_option__ : (int
-> getnameinfo_option) Core.Std.Bin_prot.Read.reader
end
#
val gethostname : unit -> string
#
val getuid : unit -> int
#
val geteuid : unit -> int
#
val getgid : unit -> int
#
val getegid : unit -> int
#
val setuid : int -> unit
#
module Error = Core.Std.Unix.Error
#
type error = Core.Std.Unix.error =
Deprecated in favor of
Error.t
#
exception Unix_error
of Error.t * string * string
#
module Terminal_io : sig
#
type t = Core.Std.Caml.Unix.terminal_io = {
| : bool | ; | (* | Ignore the break condition. | *) |
| : bool | ; | (* | Signal interrupt on break condition. | *) |
| : bool | ; | (* | Ignore characters with parity errors. | *) |
| : bool | ; | (* | Mark parity errors. | *) |
| : bool | ; | (* | Enable parity check on input. | *) |
| : bool | ; | (* | Strip 8th bit on input characters. | *) |
| : bool | ; | (* | Map NL to CR on input. | *) |
| : bool | ; | (* | Ignore CR on input. | *) |
| : bool | ; | (* | Map CR to NL on input. | *) |
| : bool | ; | (* | Recognize XON/XOFF characters on input. | *) |
| : bool | ; | (* | Emit XON/XOFF chars to control input flow. | *) |
| : bool | ; | (* | Enable output processing. | *) |
| : int | ; | (* | Output baud rate (0 means close connection). | *) |
| : int | ; | (* | Input baud rate. | *) |
| : int | ; | (* | Number of bits per character (5-8). | *) |
| : int | ; | (* | Number of stop bits (1-2). | *) |
| : bool | ; | (* | Reception is enabled. | *) |
| : bool | ; | (* | Enable parity generation and detection. | *) |
| : bool | ; | (* | Specify odd parity instead of even. | *) |
| : bool | ; | (* | Hang up on last close. | *) |
| : bool | ; | (* | Ignore modem status lines. | *) |
| : bool | ; | (* | Generate signal on INTR, QUIT, SUSP. | *) |
| : bool | ; | (* | Enable canonical processing
(line buffering and editing) | *) |
| : bool | ; | (* | Disable flush after INTR, QUIT, SUSP. | *) |
| : bool | ; | (* | Echo input characters. | *) |
| : bool | ; | (* | Echo ERASE (to erase previous character). | *) |
| : bool | ; | (* | Echo KILL (to erase the current line). | *) |
| : bool | ; | (* | Echo NL even if c_echo is not set. | *) |
| : char | ; | (* | Interrupt character (usually ctrl-C). | *) |
| : char | ; | (* | Quit character (usually ctrl-\ ). | *) |
| : char | ; | (* | Erase character (usually DEL or ctrl-H). | *) |
| : char | ; | (* | Kill line character (usually ctrl-U). | *) |
| : char | ; | (* | End-of-file character (usually ctrl-D). | *) |
| : char | ; | (* | Alternate end-of-line char. (usually none). | *) |
| : int | ; | (* | Minimum number of characters to read
before the read request is satisfied. | *) |
| : int | ; | (* | Maximum read wait (in 0.1s units). | *) |
| : char | ; | (* | Start character (usually ctrl-Q). | *) |
| : char | ; | (* | Stop character (usually ctrl-S). | *) |
}
#
type setattr_when = Core.Std.Caml.Unix.setattr_when =
#
val tcgetattr :
Fd.
t -> t Import.Deferred.t
end
#
module Passwd : sig
Structure of entries in the passwd
database.
#
type t = Core.Std.Unix.Passwd.t = {
| : string | ; | | | |
| : string | ; | | | |
| : int | ; | | | |
| : int | ; | | | |
| : string | ; | | | |
| : string | ; | | | |
| : string | ; | | | |
}
#
module Fields : sig
#
val names : string list
#
val shell : (
t, string) Fieldslib.Field.t
#
val dir : (
t, string) Fieldslib.Field.t
#
val gecos : (
t, string) Fieldslib.Field.t
#
val gid : (
t, int) Fieldslib.Field.t
#
val uid : (
t, int) Fieldslib.Field.t
#
val passwd : (
t, string) Fieldslib.Field.t
#
val name : (
t, string) Fieldslib.Field.t
#
val fold : init:'acc__
-> name:('acc__
-> (
t, string) Fieldslib.Field.t
-> 'acc__)
-> passwd:('acc__
-> (
t, string) Fieldslib.Field.t
-> 'acc__)
-> uid:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> gid:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> gecos:('acc__
-> (
t, string) Fieldslib.Field.t
-> 'acc__)
-> dir:('acc__
-> (
t, string) Fieldslib.Field.t
-> 'acc__)
-> shell:('acc__
-> (
t, string) Fieldslib.Field.t
-> 'acc__)
-> 'acc__
#
val make_creator : name:((
t, string) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string) * 'compile_acc__)
-> passwd:((
t, string) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string) * 'compile_acc__)
-> uid:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> gid:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> gecos:((
t, string) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string) * 'compile_acc__)
-> dir:((
t, string) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string) * 'compile_acc__)
-> shell:((
t, string) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string) * 'compile_acc__)
-> 'compile_acc__
-> ('input__
-> t) * 'compile_acc__
#
val create : name:string
-> passwd:string
-> uid:int
-> gid:int
-> gecos:string
-> dir:string
-> shell:string
-> t
#
val map : name:((
t, string) Fieldslib.Field.t
-> string)
-> passwd:((
t, string) Fieldslib.Field.t
-> string)
-> uid:((
t, int) Fieldslib.Field.t
-> int)
-> gid:((
t, int) Fieldslib.Field.t
-> int)
-> gecos:((
t, string) Fieldslib.Field.t
-> string)
-> dir:((
t, string) Fieldslib.Field.t
-> string)
-> shell:((
t, string) Fieldslib.Field.t
-> string)
-> t
#
val iter : name:((
t, string) Fieldslib.Field.t
-> unit)
-> passwd:((
t, string) Fieldslib.Field.t
-> unit)
-> uid:((
t, int) Fieldslib.Field.t
-> unit)
-> gid:((
t, int) Fieldslib.Field.t
-> unit)
-> gecos:((
t, string) Fieldslib.Field.t
-> unit)
-> dir:((
t, string) Fieldslib.Field.t
-> unit)
-> shell:((
t, string) Fieldslib.Field.t
-> unit)
-> unit
#
val for_all : name:((
t, string) Fieldslib.Field.t
-> bool)
-> passwd:((
t, string) Fieldslib.Field.t
-> bool)
-> uid:((
t, int) Fieldslib.Field.t
-> bool)
-> gid:((
t, int) Fieldslib.Field.t
-> bool)
-> gecos:((
t, string) Fieldslib.Field.t
-> bool)
-> dir:((
t, string) Fieldslib.Field.t
-> bool)
-> shell:((
t, string) Fieldslib.Field.t
-> bool)
-> bool
#
val exists : name:((
t, string) Fieldslib.Field.t
-> bool)
-> passwd:((
t, string) Fieldslib.Field.t
-> bool)
-> uid:((
t, int) Fieldslib.Field.t
-> bool)
-> gid:((
t, int) Fieldslib.Field.t
-> bool)
-> gecos:((
t, string) Fieldslib.Field.t
-> bool)
-> dir:((
t, string) Fieldslib.Field.t
-> bool)
-> shell:((
t, string) Fieldslib.Field.t
-> bool)
-> bool
#
val to_list : name:((
t, string) Fieldslib.Field.t
-> 'elem__)
-> passwd:((
t, string) Fieldslib.Field.t
-> 'elem__)
-> uid:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> gid:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> gecos:((
t, string) Fieldslib.Field.t
-> 'elem__)
-> dir:((
t, string) Fieldslib.Field.t
-> 'elem__)
-> shell:((
t, string) Fieldslib.Field.t
-> 'elem__)
-> 'elem__ list
#
val map_poly : ([<
| `Read
| `Set_and_create
],
t, 'x0) Fieldslib.Field.user
-> 'x0 list
#
module Direct : sig
#
val iter :
t -> name:((
t, string) Fieldslib.Field.t
-> t -> string
-> unit)
-> passwd:((
t, string) Fieldslib.Field.t
-> t -> string
-> unit)
-> uid:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> gid:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> gecos:((
t, string) Fieldslib.Field.t
-> t -> string
-> unit)
-> dir:((
t, string) Fieldslib.Field.t
-> t -> string
-> unit)
-> shell:((
t, string) Fieldslib.Field.t
-> t -> string
-> unit)
-> unit
#
val fold :
t -> init:'acc__
-> name:('acc__
-> (
t, string) Fieldslib.Field.t
-> t -> string
-> 'acc__)
-> passwd:('acc__
-> (
t, string) Fieldslib.Field.t
-> t -> string
-> 'acc__)
-> uid:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> gid:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> gecos:('acc__
-> (
t, string) Fieldslib.Field.t
-> t -> string
-> 'acc__)
-> dir:('acc__
-> (
t, string) Fieldslib.Field.t
-> t -> string
-> 'acc__)
-> shell:('acc__
-> (
t, string) Fieldslib.Field.t
-> t -> string
-> 'acc__)
-> 'acc__
end
end
#
val getbyname : string
-> t option Import.Deferred.t
#
val getbyname_exn : string
-> t Import.Deferred.t
#
val getbyuid : int
-> t option Import.Deferred.t
#
val getbyuid_exn : int
-> t Import.Deferred.t
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
end
#
module Group : sig
Structure of entries in the groups
database.
#
type t = {
| : string | ; | | | |
| : string | ; | | | |
| : int | ; | | | |
| : string array | ; | | | |
}
#
val mem :
t -> string array
#
module Fields : sig
#
val names : string list
#
val mem : (
t, string array) Fieldslib.Field.t
#
val gid : (
t, int) Fieldslib.Field.t
#
val passwd : (
t, string) Fieldslib.Field.t
#
val name : (
t, string) Fieldslib.Field.t
#
val fold : init:'acc__
-> name:('acc__
-> (
t, string) Fieldslib.Field.t
-> 'acc__)
-> passwd:('acc__
-> (
t, string) Fieldslib.Field.t
-> 'acc__)
-> gid:('acc__
-> (
t, int) Fieldslib.Field.t
-> 'acc__)
-> mem:('acc__
-> (
t, string array) Fieldslib.Field.t
-> 'acc__)
-> 'acc__
#
val make_creator : name:((
t, string) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string) * 'compile_acc__)
-> passwd:((
t, string) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string) * 'compile_acc__)
-> gid:((
t, int) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> int) * 'compile_acc__)
-> mem:((
t, string array) Fieldslib.Field.t
-> 'compile_acc__
-> ('input__
-> string array) * 'compile_acc__)
-> 'compile_acc__
-> ('input__
-> t) * 'compile_acc__
#
val create : name:string
-> passwd:string
-> gid:int
-> mem:string array
-> t
#
val map : name:((
t, string) Fieldslib.Field.t
-> string)
-> passwd:((
t, string) Fieldslib.Field.t
-> string)
-> gid:((
t, int) Fieldslib.Field.t
-> int)
-> mem:((
t, string array) Fieldslib.Field.t
-> string array)
-> t
#
val iter : name:((
t, string) Fieldslib.Field.t
-> unit)
-> passwd:((
t, string) Fieldslib.Field.t
-> unit)
-> gid:((
t, int) Fieldslib.Field.t
-> unit)
-> mem:((
t, string array) Fieldslib.Field.t
-> unit)
-> unit
#
val for_all : name:((
t, string) Fieldslib.Field.t
-> bool)
-> passwd:((
t, string) Fieldslib.Field.t
-> bool)
-> gid:((
t, int) Fieldslib.Field.t
-> bool)
-> mem:((
t, string array) Fieldslib.Field.t
-> bool)
-> bool
#
val exists : name:((
t, string) Fieldslib.Field.t
-> bool)
-> passwd:((
t, string) Fieldslib.Field.t
-> bool)
-> gid:((
t, int) Fieldslib.Field.t
-> bool)
-> mem:((
t, string array) Fieldslib.Field.t
-> bool)
-> bool
#
val to_list : name:((
t, string) Fieldslib.Field.t
-> 'elem__)
-> passwd:((
t, string) Fieldslib.Field.t
-> 'elem__)
-> gid:((
t, int) Fieldslib.Field.t
-> 'elem__)
-> mem:((
t, string array) Fieldslib.Field.t
-> 'elem__)
-> 'elem__ list
#
val map_poly : ([<
| `Read
| `Set_and_create
],
t, 'x0) Fieldslib.Field.user
-> 'x0 list
#
module Direct : sig
#
val iter :
t -> name:((
t, string) Fieldslib.Field.t
-> t -> string
-> unit)
-> passwd:((
t, string) Fieldslib.Field.t
-> t -> string
-> unit)
-> gid:((
t, int) Fieldslib.Field.t
-> t -> int
-> unit)
-> mem:((
t, string array) Fieldslib.Field.t
-> t -> string array
-> unit)
-> unit
#
val fold :
t -> init:'acc__
-> name:('acc__
-> (
t, string) Fieldslib.Field.t
-> t -> string
-> 'acc__)
-> passwd:('acc__
-> (
t, string) Fieldslib.Field.t
-> t -> string
-> 'acc__)
-> gid:('acc__
-> (
t, int) Fieldslib.Field.t
-> t -> int
-> 'acc__)
-> mem:('acc__
-> (
t, string array) Fieldslib.Field.t
-> t -> string array
-> 'acc__)
-> 'acc__
end
end
#
val getbyname : string
-> t option Import.Deferred.t
#
val getbyname_exn : string
-> t Import.Deferred.t
#
val getbygid : int
-> t option Import.Deferred.t
#
val getbygid_exn : int
-> t Import.Deferred.t
#
val t_of_sexp : Sexplib.Sexp.t
-> t
#
val sexp_of_t :
t -> Sexplib.Sexp.t
end
#
val getlogin : unit
-> string Import.Deferred.t
Return the login name of the user executing the process.
This returns a deferred because the username may need to be looked up in what is
essentially a database elsewhere on the network (winbound user, or NIS).
#
val wordexp : (?flags:[
| `No_cmd
| `Show_err
| `Undef
] list
-> string
-> string array Import.Deferred.t) Core.Std.Or_error.t
#
val wait_on_of_sexp : Sexplib.Sexp.t
-> wait_on
#
val __wait_on_of_sexp__ : Sexplib.Sexp.t
-> wait_on
#
val sexp_of_wait_on :
wait_on -> Sexplib.Sexp.t
#
val bin_socket_domain :
socket_domain Core.Std.Bin_prot.Type_class.t
#
val bin_read_socket_domain :
socket_domain Core.Std.Bin_prot.Read.reader
#
val __bin_read_socket_domain__ : (int
-> socket_domain) Core.Std.Bin_prot.Read.reader
#
val bin_reader_socket_domain :
socket_domain Core.Std.Bin_prot.Type_class.reader
#
val bin_size_socket_domain :
socket_domain Core.Std.Bin_prot.Size.sizer
#
val bin_write_socket_domain :
socket_domain Core.Std.Bin_prot.Write.writer
#
val bin_writer_socket_domain :
socket_domain Core.Std.Bin_prot.Type_class.writer
#
val bin_socket_type :
socket_type Core.Std.Bin_prot.Type_class.t
#
val bin_read_socket_type :
socket_type Core.Std.Bin_prot.Read.reader
#
val __bin_read_socket_type__ : (int
-> socket_type) Core.Std.Bin_prot.Read.reader
#
val bin_reader_socket_type :
socket_type Core.Std.Bin_prot.Type_class.reader
#
val bin_size_socket_type :
socket_type Core.Std.Bin_prot.Size.sizer
#
val bin_write_socket_type :
socket_type Core.Std.Bin_prot.Write.writer
#
val bin_writer_socket_type :
socket_type Core.Std.Bin_prot.Type_class.writer
#
val sockaddr_of_sexp : Sexplib.Sexp.t
-> sockaddr
#
val sexp_of_sockaddr :
sockaddr -> Sexplib.Sexp.t
#
val bin_sockaddr :
sockaddr Core.Std.Bin_prot.Type_class.t
#
val bin_read_sockaddr :
sockaddr Core.Std.Bin_prot.Read.reader
#
val __bin_read_sockaddr__ : (int
-> sockaddr) Core.Std.Bin_prot.Read.reader
#
val bin_reader_sockaddr :
sockaddr Core.Std.Bin_prot.Type_class.reader
#
val bin_size_sockaddr :
sockaddr Core.Std.Bin_prot.Size.sizer
#
val bin_write_sockaddr :
sockaddr Core.Std.Bin_prot.Write.writer
#
val bin_writer_sockaddr :
sockaddr Core.Std.Bin_prot.Type_class.writer
#
val error_of_sexp : Sexplib.Sexp.t
-> error
#
val sexp_of_error :
error -> Sexplib.Sexp.t