|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
Parsing and resolution for the URLs the HTTP and WebSocket transports dial. More...
#include <cstdint>#include <string>#include <string_view>#include <absl/status/statusor.h>Go to the source code of this file.
Classes | |
| struct | a11::net::ParsedUrl |
| An absolute URL split into the parts a connection needs. More... | |
Namespaces | |
| namespace | a11 |
| namespace | a11::net |
Functions | |
| std::uint16_t | a11::net::DefaultPortForScheme (std::string_view scheme) |
| absl::StatusOr< ParsedUrl > | a11::net::ParseUrl (std::string_view url) |
Parses an absolute http/https/ws/wss URL. | |
| absl::StatusOr< ParsedUrl > | a11::net::ResolveReference (const ParsedUrl &base, std::string_view reference) |
Resolves reference against base, as a redirect target. | |
Parsing and resolution for the URLs the HTTP and WebSocket transports dial.
Three transports each grew a private copy of this (the SSE client, the WebSocket client, and the WebSocket signalling client), and a fourth caller – following a Location header while downloading – needs reference resolution none of them had. One parser serves them all.
The scope is limited to absolute http/https/ws/wss URLs with an authority, plus the relative forms a redirect may answer with. This is not a general RFC 3986 implementation – there is no userinfo, no percent normalisation, and no dot-segment removal beyond what ResolveReference needs.