Listening to a UDP broadcast
I need to listen to a network broadcast coming over UDP. The datagram contains a j4cDAC_broadcast struct. I have tried following a few tutorials, but they seem to have left a few things out and dont have very detailed explanations, if any. With what I have right now I am getting an error BIND FAILED 10049 and error 10049 indicates that the address is unavailable. The broadcast is coming in on 255.255.255.255:7654. How do I fix this error? This is what I have so far: void test() { WSADATA wsd; SOCKET s; j4cDAC_broadcast recieve; char *read = (char*) malloc(sizeof(j4cDAC_broadcast)); int ret;