My router has NAT Loopback meaning I can run a server/client on the same computer and connect them using the external IP address. I didnt have any problems doing this with the first version of darknet, but after updating to the newest version (thats been out a while now) I can only connect using the local IP address.
Here is my code for running the server:
string IP is equal to the external IP address
const char * cIP = mn::DNS_B(IP.c_str());
__int64 profile = mn::CreateInstanceProfile();
mn::SetProfileLocal(profile, cIP, port, cIP, port);
mn::SetProfileModeUDP(profile, NetMode::UDP_PER_CLIENT_PER_OPERATION);
mn::SetProfileNumOperationsUDP(profile, Number_Of_UDP_Operations);
return mn::StartServer(0, NumberOfClients, profile);
I also included a test program.