VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
url_parser.h 文件参考

RFC-compliant URL/URI parser used internally by the VLink transport layer. 更多...

#include <cstdint>
#include <map>
#include <string>
#include "../base/macros.h"
url_parser.h 的引用(Include)关系图:

浏览该文件的源代码.

 Immutable RFC-3986 URL parser. 更多...

命名空间

详细描述

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:

dds://my_domain/vehicle/speed?domain_id=1&qos=best_effort
intra://my_topic
someip://127.0.0.1:30490/my_service?instance_id=1
Supported URL Components
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 #
Query Dictionary
The query string is automatically split into a std::map<string,string> using either & (default) or ; as the key-value pair separator. Values are split on the first = character.
Category
  • 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.