boost::corosio::detect_endpoint_format

Detect the format of an endpoint string.

Synopsis

endpoint_format
detect_endpoint_format(std::string_view s) noexcept;

Description

This helper function determines the endpoint format based on simple rules: 1. Starts with [ ‐> ipv6_bracketed 2. Else count : characters: ‐ 0 colons ‐> ipv4_no_port ‐ 1 colon ‐> ipv4_with_port ‐ 2+ colons ‐> ipv6_no_port

Return Value

The detected endpoint format.

Parameters

Name Description

s

The string to analyze.

Created with MrDocs