robbiehanson/CocoaAsyncSocket — Issue #19: CFSocketSetAddress in AsyncUDPSocket fails with broadcast address
Author: gghose
Created: 2012-01-26 04:23:17+00:00
State: open

What steps will reproduce the problem?
1. hostname is set to 192.168.137.255, port 1002
2. enableBroadcast is set to yes

[remoteSocket bindToAddress:hostname port:thePort error:&err]
fails with the error
Cannot accept connections on port 1002. Error domain AsyncUdpSocketErrorDomain code -1 (General CFSocket error).

Interestingly, I believe the problem is with multiple physical ethernet interfaces. 192.168.137.255 is a net on en1 not en0. It appears that the same code works fine when the broadcast hostname *.255 is routed to en0, but not to en1.

What is the expected output? What do you see instead?
Expect success. Instead:
Cannot accept connections on port 1002. Error domain AsyncUdpSocketErrorDomain code -1 (General CFSocket error).

What version of the product are you using? On what operating system?
Dec 11 version, 10.6.8

Please provide any additional information below.

Doesn't seem to be a permissions issue. Fails under sudo as well.