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.