Net.EndpointNetwork endpoints.
type t = [ | `Host of string * intHostname and port.
*)| `Sockaddr of Unix.sockaddrDirect socket address.
*)| `Fd of Unix.file_descrDirect file descriptor.
*) ]The type for network endpoints.
val of_string : default_port:int -> string -> (t, string) Stdlib.resultof_string ~default_port s parses a socket endpoint specification from s.
The format is ADDR[:PORT] or PATH for a Unix domain socket (detected by the the presence of a directory separator). default_port port is used if no PORT is specified.
with_port_of_sockaddr addr ep makes ep's port coincide with the port of addr iff both have a port. Otherwise this is ep itself. Mostly useful to adjust an endpoint whose port number was specified as 0 in order to get the one allocated by bind(2).
val pp : Stdlib.Format.formatter -> t -> unitpp formats endpoints for inspection.