Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join Multicast group fails on iOS #238

Closed
huubeikens opened this issue May 22, 2014 · 4 comments
Closed

Join Multicast group fails on iOS #238

huubeikens opened this issue May 22, 2014 · 4 comments

Comments

@huubeikens
Copy link

I try to join an IPV6 multicast group in an iOS 7.1.1 (iphone) app but fails. The error I get is:
Error Domain=kCFStreamErrorDomainPOSIX Code=-1 "Unable to join IPv6 multicast group" UserInfo=0x15d5b590 {NSLocalizedDescription=Unable to join IPv6 multicast group}

Code (snippit) I'm using is:
const NSString* ipcMulticastAddress = @"FF15::e755";
const NSInteger ipcPort = 9009;
socket = [[AsyncUdpSocket alloc] init] ;
[[self socket] setDelegate:self];
[self connect];
BOOL result = [socket bindToPort:ipcPort error:&err];
result = [socket joinMulticastGroup:(NSString*)ipcMulticastAddress error:&err];
The error occurs at the last line when doing joinMulticastGroup.

@huubeikens
Copy link
Author

I've found the solution and created a fix:
#239

@mdspann
Copy link

mdspann commented Jun 25, 2014

Change line 1138 of AsyncUdpSocket.m from
error = setsockopt(CFSocketGetNative(theSocket6), IPPROTO_IP, IPV6_JOIN_GROUP,
to
error = setsockopt(CFSocketGetNative(theSocket6), IPPROTO_IPV6, IPV6_JOIN_GROUP,

That fixed it for me.

@PrzemekMalak
Copy link

W dniach 2013.06.01 do 2013.06.10 jestem nieobecny.

Thank you for your email. At present I am unavailable to attend to your message. A reply will be made after June 9th.

@github-actions
Copy link

This issue has been marked as stale, it will be closed automatically if there is no further activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants