The "listening" part should bind to address 0.0.0.0 with a specific port (remember to use htons()). This will bind to all public interfaces. You can use "netstat -l" to see all bound services from the command line (both on Unix and Windows.)
Then you should make sure you allow the application to listen to public networks in the Windows Firewall settings, and it should work.
You can try running Ethereal on both your buddy's machine and your own machine when trying to connect, to see what kinds of packets are on the network in both places.
I define my listener as follows:
Public listenerEndpoint As New IPEndPoint(System.Net.IPAddress.Any, 54329) Public rxClient As New UdpClient(listenerEndpoint) 'This client will listen on port 54329
I ran a netstat -a -p UDP command and found the following line:
Proto Local Address Foreign Address State . . . . . . UDP 0.0.0.0:54329 *:*
It would appear as though everything is normal. I made an Inbound Rule in my firewall for my application and made sure that it's profiles are enabled for Domain, Public and Private connections. I also made Inbound and Outbound rules for Port 54329 which is the port that I'm listening on.
I tested it with my friend once again, and got the exact same results - I still don't receive anything. I can still receive messages locally if I send them to 127.0.0.1:54329 which tells me that the code for the listener is at least working as intended... I looked in Wireshark (on my end) and it still says that the port is unreachable when I send messages to my public IP address on port 54329.