I am trying to connect to a TCP socket on a Windows XP machine using the computer name from an iPad.
I've tried using:
getaddrinfo(hostName, 4097, &hints, &res0);
This fails when hostName = "MyHost"
and succeeds when hostName = "192.168.0.4"
I've tried using AsynchSockets with the same results using:
[mySocket connectToHost:hostName onPort:4097 error:nil];
The XP machines do just fine connecting using:
Winsock.RemoteHost = "MyHost"
for VB
and
MySocket->Connect("MyHost", 4097);
for C++
How do I do something similar on the iPad using Xcode?