package b0

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Os.SocketSource

Socket operations.

Sourcemodule Endpoint : sig ... end

Endpoints.

Sourceval of_endpoint : Endpoint.t -> Unix.socket_type -> (Unix.sockaddr option * Unix.file_descr * bool, string) result

socket_of_endpoint e st is Ok (addr, fd, close) with:

  • addr, the address for the socket, if any.
  • fd, the file descriptor for the socket. If c is `Fd fd this is fd untouched. Otherwise fd is a new file descriptor set to non-blocking mode and has close on exec set to true.
  • close is true if the caller is in charge of closing it. This is false iff c is `Fd _.
Sourceval pp_sockaddr : Format.formatter -> Unix.sockaddr -> unit

pp_sockaddr formats a socket address.