Closed
Description
Hi.
I use GCDAsyncSoclet.
Will the NAT64(IPv6-Only Networks) does not support ?
I did the work in accordance with the procedure.
But can't move CocoaAsyncSocket.
[socket connectToHost:SERVER onPort:PORT error:&err]
lost connect Error Domain=NSPOSIXErrorDomain Code=51 "Network is unreachable" UserInfo={NSLocalizedDescription=Network is unreachable, NSLocalizedFailureReason=Error in connect() function}
Won't you please,help me.
Activity
ogkent commentedon Feb 9, 2016
Set
IPv4PreferredOverIPv6 = NO
. See issue #315 for more info.tanshio commentedon Feb 10, 2016
Thanks.
IPv4PreferredOverIPv6 = NO
It was already set.
But,IP Address can't work.
Domain
[socket2 connectToHost:@"example.com" onPort:8084 error:&err]
Log
It worked.
But
IP
[socket2 connectToHost:@"xxx.xxx.xxx.xxx" onPort:8084 error:&err]
Log
Port Number set 0.
Why?
ogkent commentedon Feb 10, 2016
Looks like you're trying to use an IPv4 address. Of course IPv6 won't work. You need an IPv6 address, e.g.
2001:db8:85a3:0:0:8a2e:370:7334
.tanshio commentedon Feb 16, 2016
Thanks.
I created method.
newacct commentedon Mar 19, 2016
You shouldn't need to do that because
connectToHost:
already callslookupHost:
jadynJT commentedon Jun 22, 2016
great
JeroldLiu777 commentedon Nov 28, 2016
ok, share my answer.works for me.
DONE
ashishgupta301 commentedon Jun 7, 2017
In the following method we get address4 and address6,
+(BOOL)connectWithAddress4:(NSData *)address4 address6:(NSData *)address6 error:(NSError **)errPtr
so not working for IPV4. Working fine with IPV6
Any idea about it?