Support for advanced Netty options

Fixes #2747.

To test this, I set a breakpoint on the point where Netty calls Socket.setKeepAlive, and ensured that it was set.