This is a file/dns server program I wrote.
just run it to start hosting a dns server, launch it with an additional argument to show the debug.
DNS/File server:
http://pastebin.com/pxFY89UZ
The next file is the networking API I wrote to deal with server communications, it has 6 functions;
register(name, port):
This will register the machine with a name on the dns server, all further communications can be sent to the server and will be routed automatically.
send(receiverName, message, opt1, opt2):
This will send a message to the server which will then route it to receiverN