Look into libp2p created by the Protocol Labs team (created IPFS). We're thinking of moving to this framework internally at Ethereum.
Why not GNUnet? Check the recently released 181 pages long dissertation on it:
https://pdfs.semanticscholar.org/153d/578869863450766a870727...
Previous Hacker News discussion here: https://news.ycombinator.com/item?id=15877908
> The core of Ethereum will be released under the most liberal of licenses. This reflects our desire to have Ethereum used in as many diverse environments as possible, even those which, for various reasons can require modifications or augmentations to the software which cannot be released to the public.
If you end up rolling your own, I found js to have the most building blocks (pmp and upnp libraries).