SpoutDev/Spoutcraft — pull request #61 by raws (2012-02-22 16:54:43+00:00)
Title: Implement SRV DNS record lookup for multiplayer server connections

This pull implements [SRV record lookup](http://forums.spout.org/threads/url-as-part-of-the-login-process.986/#post-10253) when polling and connecting to multiplayer servers. In addition, it:

* Replaces instances of `25565` with `ServerItem.DEFAULT_PORT`
* Adds portable static `NetworkUtils` DNS resolution methods

Despite [the virtual hosting addition](http://wiki.vg/Pre-release_protocol#Handshake_.280x02.29) made to the upcoming 1.2 Mojang protocol, I believe SRV resolution remains a valuable addition to the client, both as an established (albeit underused) internet standard, and as an alternative method of virtually hosting servers without requiring an intermediary proxy server.

[SRV records](http://en.wikipedia.org/wiki/SRV_record) require a "service name". I chose `minecraft`, presuming it's the name Mojang would likely choose if they were to implement SRV lookup in their client, given Spout's desired interoperability.

I introduce a ~300 KB dependency on [dnsjava](http://www.dnsjava.org/) 2.1.3, which is BSD-licensed, and compatible with LGPL.

This pull should close [Spout #369](https://github.com/SpoutDev/Spout/issues/369).