Added local network detection and changed a few internals while updating to Netty 4.0.0.Final.