package uri

  1. Overview
  2. Docs
An RFC3986 URI/URL parsing library

Install

Dune Dependency

Authors

Maintainers

Sources

uri-v2.2.1.tbz
sha256=f6348edbae9b9011b3f65e85e775f2cf7b87735c5ceb54d6962377daec3bf56b
sha512=28a4a659695d5d02f8a1b2965cbb05bc864bea5576c447707bb7db0e7411cafc78323ba6729e32b8b31fdc24a53e906274812d377e62829ebc9ebd6602331176

doc/uri.services_full/Uri_services_full/index.html

Module Uri_services_full

Module that maps the IANA well-known ports to and from their textual service names

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

val known_tcp_services : string list

List of known TCP services. These keys are guaranteed to match in the rest of the lookup functions.

val known_udp_services : string list

List of known UDP services. These keys are guaranteed to match in the rest of the lookup functions.

val known_services : (string * string list) list

Association list of protocol * service list. Usually populated with at least "tcp" and "udp" keys for those respective protocols.

OCaml

Innovation. Community. Security.