package posix-socket

  1. Overview
  2. Docs

Module Posix_socketSource

Sourceval ntohl : Unsigned.uint32 -> Unsigned.uint32

network/host byte order conversion functions.

Sourceval ntohs : Unsigned.uint16 -> Unsigned.uint16
Sourceval htonl : Unsigned.uint32 -> Unsigned.uint32
Sourceval htons : Unsigned.uint16 -> Unsigned.uint16
Sourcetype socket_type

Socket types.

Sourceval socket_type_t : socket_type Ctypes.typ
val sock_dgram : socket_type
val sock_stream : socket_type
val sock_seqpacket : socket_type

Type of the sa_family field.

Sourcetype sa_family_t = Sa_family.t
Sourceval sa_family_t : sa_family_t Ctypes.typ
Sourceval af_inet : sa_family_t

Socket types constants.

Sourceval af_inet6 : sa_family_t
Sourceval af_unspec : sa_family_t
Sourcemodule Socklen : Unsigned.S

Ctypes routines for C type socklen_t.

Sourcetype socklen_t
Sourceval socklen_t : socklen_t Ctypes.typ
Sourcemodule SockaddrStorage : sig ... end

Storage-safe overall structure. Used to allocate a structure large enough for any of the sub-types below.

Sourceval sockaddr_storage_t : sockaddr_storage Ctypes.typ
Sourcemodule Sockaddr : sig ... end

Generic sockaddr_t structure.

Sourceval sockaddr_t : sockaddr Ctypes.typ
Sourcetype in_port = Unsigned.uint16

Type for inet/inet6 socket port.

Sourceval in_port_t : Unsigned.uint16 Ctypes.typ
Sourcemodule SockaddrInet : sig ... end

INET (ipv4) socket_in structure.

Sourceval sockaddr_in_t : sockaddr_in Ctypes.typ
Sourcemodule SockaddrInet6 : sig ... end

INET6 (ipv6) socket_in6 structure.

Sourceval sockaddr_in6_t : sockaddr_in6 Ctypes.typ
Sourceval getnameinfo : sockaddr Ctypes.ptr -> string * int

IP address conversion functions.

Sourceval getaddrinfo : string -> int -> sockaddr Ctypes.ptr Ctypes.ptr
Sourceval strnlen : char Ctypes.ptr -> Unsigned.size_t -> Unsigned.size_t

Misc

Sourceval from_unix_sockaddr : Unix.sockaddr -> sockaddr Ctypes.ptr

Interface with the Unix module.

Sourceval to_unix_sockaddr : sockaddr Ctypes.ptr -> Unix.sockaddr
OCaml

Innovation. Community. Security.