/** Set this to true if you want to make the server SSL */
private static final boolean USE_SSL = false;
public static void main(String[] args) throws Exception {
NioSocketAcceptor acceptor = new NioSocketAcceptor();
DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
MdcInjectionFilter mdcInjectionFilter = new MdcInjectionFilter();
chain.addLast("mdc", mdcInjectionFilter);
// Add SSL filter if SSL is enabled.
if (USE_SSL) {
addSSLSupport(chain);
}
chain.addLast("codec", new ProtocolCodecFilter(
new TextLineCodecFactory()));
addLogger(chain);
// Bind