The Battle for Wesnoth  1.15.2+dev
Functions
parse_network_address.cpp File Reference
#include <regex>
#include <string>
Include dependency graph for parse_network_address.cpp:

Go to the source code of this file.

Functions

std::pair< std::string, std::string > parse_network_address (const std::string &address, const std::string &default_port)
 Parse a host:port style network address, supporting [] notation for ipv6 addresses. More...
 

Function Documentation

◆ parse_network_address()

std::pair<std::string, std::string> parse_network_address ( const std::string &  address,
const std::string &  default_port 
)

Parse a host:port style network address, supporting [] notation for ipv6 addresses.

Parameters
address
default_portthe port to return if address doesn't have it specified

Definition at line 17 of file parse_network_address.cpp.

Referenced by addons_client::addons_client().