mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-18 00:15:27 +01:00
SF542 SocketAddress() needs port-only constructor
This commit is contained in:
parent
1b14088283
commit
25ea8ba735
@ -241,9 +241,6 @@ public:
|
||||
|
||||
static NetworkInterface forIndex(unsigned index);
|
||||
/// Returns the NetworkInterface for the given interface index.
|
||||
/// If an index of 0 is specified, a NetworkInterface instance
|
||||
/// representing the default interface (empty name and
|
||||
/// wildcard address) is returned.
|
||||
///
|
||||
/// Throws an InterfaceNotFoundException if an interface
|
||||
/// with the given index does not exist (or IPv6 is not
|
||||
|
@ -64,16 +64,20 @@ public:
|
||||
/// Creates a wildcard (all zero) IPv4 SocketAddress.
|
||||
|
||||
SocketAddress(const IPAddress& host, Poco::UInt16 port);
|
||||
/// Creates a SocketAddress from an IP address and a port number.
|
||||
/// Creates a SocketAddress from an IP address and given port number.
|
||||
|
||||
SocketAddress(Poco::UInt16 port);
|
||||
/// Creates a SocketAddress with unspecified (wildcard) IP address
|
||||
/// and given port number.
|
||||
|
||||
SocketAddress(const std::string& host, Poco::UInt16 port);
|
||||
/// Creates a SocketAddress from an IP address and a port number.
|
||||
/// Creates a SocketAddress from an IP address and given port number.
|
||||
///
|
||||
/// The IP address must either be a domain name, or it must
|
||||
/// be in dotted decimal (IPv4) or hex string (IPv6) format.
|
||||
|
||||
SocketAddress(const std::string& host, const std::string& port);
|
||||
/// Creates a SocketAddress from an IP address and a
|
||||
/// Creates a SocketAddress from an IP address and the
|
||||
/// service name or port number.
|
||||
///
|
||||
/// The IP address must either be a domain name, or it must
|
||||
@ -83,7 +87,7 @@ public:
|
||||
/// a service name.
|
||||
|
||||
explicit SocketAddress(const std::string& hostAndPort);
|
||||
/// Creates a SocketAddress from an IP address or host name and a
|
||||
/// Creates a SocketAddress from an IP address or host name and the
|
||||
/// port number/service name. Host name/address and port number must
|
||||
/// be separated by a colon. In case of an IPv6 address,
|
||||
/// the address part must be enclosed in brackets.
|
||||
|
@ -233,6 +233,12 @@ SocketAddress::SocketAddress(const IPAddress& addr, Poco::UInt16 port)
|
||||
}
|
||||
|
||||
|
||||
SocketAddress::SocketAddress(Poco::UInt16 port)
|
||||
{
|
||||
init(IPAddress(), port);
|
||||
}
|
||||
|
||||
|
||||
SocketAddress::SocketAddress(const std::string& addr, Poco::UInt16 port)
|
||||
{
|
||||
init(addr, port);
|
||||
|
Loading…
x
Reference in New Issue
Block a user