SocketAddress: constructor taking single string now also accepts a local socket path on UNIX platforms

This commit is contained in:
Guenter Obiltschnig
2015-09-16 09:26:30 +02:00
parent 5bde0dae76
commit 86f2094d09
3 changed files with 16 additions and 0 deletions

View File

@@ -285,6 +285,14 @@ void SocketAddress::init(const std::string& hostAndPort)
std::string port;
std::string::const_iterator it = hostAndPort.begin();
std::string::const_iterator end = hostAndPort.end();
#if defined(POCO_OS_FAMILY_UNIX)
if (*it == '/')
{
newLocal(hostAndPort);
return;
}
#endif
if (*it == '[')
{
++it;