When using Net library, I noticed IPv4SocketAddressImpl::af() returning zero instead of 2(AF_INET). This is happening because the address location of _addr is changing. The value of the pointer for _addr in IPv4SocketAddressImpl::IPv4SocketAddressImpl(const void* addr, UInt16 port) is 0x7fbd4250002c. While in the method af(), the address is 0x7fbd42500028.
I tried moving the following inline methods "af, host, port, length" into the SocketAddressImpl.cpp and then compiled Net library. After this the problem went away. However, I think there might be a serious problem here. Can this please be looked into by Poco team.
I am using poco-poco-1.5.2 official release that has been released couple of days ago and I am using Poco library on Mac.
The failure happens in the following method calls.
SocketAddress address(serverName, port);
The socket.connect gives an error saying "Address family not supported" because the af() method returns value 0.