As an attempt at wrapping my head around udp sockets I've tried to port the code from this tutorial page http://www.linuxhowtos.org/C_C++/socket.htm to winsock (running on win 8 if it matters). [direct links below]

The code currently compiles and runs but I never receive a packet, both programs just wait and block on recvfrom(). I keep having this same issue (for example with a modified version of this code https://stackoverflow.com/a/679529/873217 that includes a recvfrom() call. And with this code C++ problem with Datagram (UDP)winsocket to sendto and recvfrom on the same socket through the loopback adapter making the changes suggested). I imagine I'm making some simple and fundamental mistake; but I'm unable to locate it on my own. Hopefully someone with more experience can shine some light on this issue for me. Thanks.

Additional notes:
I am running the server exe and then the client exe on the same computer. It is connected to the internet. And I have tried using a domain that resolves to my IP address as well. I have also tried disabling the firewall, though I have permitted both programs full access.

direct links to original client and server code:
http://www.linuxhowtos.org/data/6/client_udp.c
http://www.linuxhowtos.org/data/6/server_udp.c

My current attempt:

both linked to libws2_32.a

client code:

#include <stdio.h>
#include <winsock2.h>
#include <string.h>

void error(const char *);

int main()
{
    WSAData dat
Edit
Report