|
VLink 2.0.0
A high-performance communication middleware
|
RFC-compliant URL/URI parser used internally by the VLink transport layer. 更多...
类 | |
| class | vlink::UrlParser |
| Immutable RFC-3986 URL parser. 更多... | |
命名空间 | |
| namespace | vlink |
RFC-compliant URL/URI parser used internally by the VLink transport layer.
UrlParser decomposes a URL string into its constituent components following a strict subset of RFC 3986. It is used by Url to extract the URI scheme (which VLink treats as the transport prefix), host, path, and query parameters from VLink topic addresses such as:
| Component | Example | Description |
|---|---|---|
| transport | dds | URI scheme / VLink transport prefix before :// |
| content | //host/path | Full content portion after the scheme |
| username | user | Optional credential before host |
| password | pass | Optional credential after : |
| host | 127.0.0.1 | Hostname or IP address |
| port | 30490 | TCP/UDP port number |
| path | /vehicle/speed | Topic path |
| query | domain_id=1&qos=... | Raw query string after ? |
| fragment | section1 | Fragment identifier after # |
std::map<string,string> using either & (default) or ; as the key-value pair separator. Values are split on the first = character.kHierarchical – standard scheme://authority/path?query#fragment syntax.kNonHierarchical – opaque scheme:content syntax (e.g. mailto:user(at)host).UrlParser is a value type; it parses the URL at construction time and provides read-only accessors for each extracted component.