equal
deleted
inserted
replaced
83 using namespace options; |
83 using namespace options; |
84 |
84 |
85 // Parse the connection string and convert it to options: |
85 // Parse the connection string and convert it to options: |
86 if (connectionString.size()) { |
86 if (connectionString.size()) { |
87 std::string connectionStringBytes = convertor.to_bytes(connectionString); |
87 std::string connectionStringBytes = convertor.to_bytes(connectionString); |
88 std::regex pattern("(tcp|udp|sctp)://(([^:]+)|\\[([0-9a-fA-F:]+(%[a-zA-Z0-9]+))\\]):([0-9]+)|(uds)://(.*)"); |
88 std::regex pattern("(tcp|udp|sctp)://(([^:]+)|\\[([0-9a-fA-F:]+(%[a-zA-Z0-9]+)?)\\]):([0-9]+)|(uds)://(.*)"); |
89 // 1 23 4 5 6 7 8 |
89 // 1 23 4 5 6 7 8 |
90 std::smatch match; |
90 std::smatch match; |
91 if (std::regex_match(connectionStringBytes, match, pattern)) { |
91 if (std::regex_match(connectionStringBytes, match, pattern)) { |
92 setIfMissing(c.options, OPTION_PROTOCOL, match[1], false); |
92 setIfMissing(c.options, OPTION_PROTOCOL, match[1], false); |
93 setIfMissing(c.options, OPTION_PROTOCOL, match[7], false); |
93 setIfMissing(c.options, OPTION_PROTOCOL, match[7], false); |