I am a complete newbie to networking, however I am a c/c++ programmer, and am working in objective-c (This is for OSX/iPhone).
I am trying to learn how to send a mag
Your problem is very simple: you are not telling the CFSocket where you want it to send the data.
You carefully construct an address in addr
, but then don't use it. You either need to call CFSocketSetAddress
to set the destination address on the socket (if you want all packets you send to go to the same destination), or pass the address as the 2nd argument to CFSocketSendData
.