module Uri_services: sig
.. end
Module that maps the more common IANA well-known ports to and from their
textual service names. To save memory, this module does not contains only
the more common services. Use the Uri_services_full
module if you need
the complete list.
val service_of_tcp_port : int -> string list
Convert a TCP port number into a list of IANA well-known service names
val service_of_udp_port : int -> string list
Convert a UDP port number into a list of IANA well-known service names
val tcp_port_of_service : string -> int list
Convert a IANA well-known service name into a list of valid TCP port numbers
val udp_port_of_service : string -> int list
Convert a IANA well-known service name into a list of valid UDP port numbers
val tcp_port_of_uri : ?default:string -> Uri.t -> int option
Extract a TCP port from a URI, using a default service if the URI does not contain a scheme
val udp_port_of_uri : ?default:string -> Uri.t -> int option
Extract a UDP port from a URI, using a default service if the URI does not contain a scheme