Ported code to Netty 4.0.10.Final

This is a port to Netty version 4.0.10.Final