Module Luv.Sockaddr
module Address_family : sig ... end
Network address families. See
socket(2)
.
module Socket_type : sig ... end
Socket types. See
socket(2)
.
type t
Binds
struct sockaddr
.The functions in this module automatically take care of converting between network and host byte order.
val ipv4 : string -> int -> (t, Error.t) Result.result
Converts a string and port number to an IPv4
struct sockaddr
.Binds
uv_ip4_addr
.
val ipv6 : string -> int -> (t, Error.t) Result.result
Converts a string and port number to an IPv6
struct sockaddr
.Binds
uv_ip4_addr
.
val to_string : t -> string option
Converts a network address to a string.
Binds either
uv_ip4_name
anduv_ip6_name
.
val port : t -> int option
Extracts the port in a network address.