Overview
Features
Download
Documentation
Community
Add-Ons & Services

IPv4SocketAddressImpl::_addr address changing...

Please post support and help requests here.

IPv4SocketAddressImpl::_addr address changing...

Postby chandramohanp » 23 Sep 2013, 18:16

Hi,

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.
Poco::Net::StreamSocket socket
SocketAddress address(serverName, port);
socket.connect(address);

The socket.connect gives an error saying "Address family not supported" because the af() method returns value 0.

Thanks
Chandra
chandramohanp
 
Posts: 2
Joined: 23 Sep 2013, 02:37

Return to Support

Who is online

Users browsing this forum: guenter and 2 guests