04-09-2012 08:31 AM
Hello
I'm, tryint to connecto to a server and I'm using the function getaddrinfo() but it fails and the error message I get is servname not supported for ai_socktype.
It's a Qt application that I'm porting and I have the <action>access_internet</action> permission in the bar file.
What can I do to solve it? Thanks in advance.
Carlos
Solved! Go to Solution.
04-09-2012 10:06 AM
Solved, I should have read the documentation more carefully instead of searching google for the error message.
I will put the answer here. I had code (that worked in iOS and PC) that set the addrinfo this way:
aiHints.ai_family=AF_INET;
for the Playbook the setting that works is the following:
aiHints.ai_family=PF_UNSPEC;
aiHints.ai_socktype=SOCK_STREAM;