Socket.EndpointEndpoints.
type t = [ | `Host of string * intHostname and port.
*)| `Sockaddr of Unix.sockaddrGiven socket address.
*)| `Fd of Unix.file_descrDirect file descriptor.
*) ]The type for specifying a socket endpoint to connect or to listen to on.
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.
val pp : Stdlib.Format.formatter -> t -> unitpp formats endpoints.
val wait_connectable :
?socket_type:Unix.socket_type ->
timeout:Mtime.Span.t ->
t ->
([ `Ready | `Timeout ], string) Stdlib.resultwait_connectable ~timeout ep st blocks until fd becomes connectable or duration timeout elapses.
socket_type defines the kind of socket, it defaults to Unix.SOCK_STREAM.
val wait_connectable' :
?socket_type:Unix.socket_type ->
timeout:Mtime.Span.t ->
t ->
(unit, string) Stdlib.resultwait_connectable' is like wait_connectable but errors with a message on timeout.