package async_unix

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

A Where_to_listen describes the socket that a tcp server should listen on.

type ('address, 'listening_on) t constraint 'address = [< Async_unix__.Unix_syscalls.Socket.Address.t ]
val sexp_of_t : ('address -> Sexplib0.Sexp.t) -> ('listening_on -> Sexplib0.Sexp.t) -> ('address, 'listening_on) t -> Sexplib0.Sexp.t
type inet = ([ `Inet of UnixLabels.inet_addr * int ], int) t
val sexp_of_inet : inet -> Sexplib0.Sexp.t
type unix = ([ `Unix of string ], string) t
val sexp_of_unix : unix -> Sexplib0.Sexp.t
val create : socket_type:'address Async_unix__.Unix_syscalls.Socket.Type.t -> address:'address -> listening_on:('address -> 'listening_on) -> ('address, 'listening_on) t
val address : ('address, _) t -> 'address

Listen on the specified port on the specified addresses.

val of_port : int -> inet

of_port port is bind_to All_addresses (On_port port).

val of_port_chosen_by_os : inet

of_port_chosen_by_os port is bind_to All_addresses On_port_chosen_by_os.

val of_file : string -> unix

Listen on a unix domain socket using the specified path.