@@ -0,0 +1,706 @@
+package com.server;%0A%0Aimport io.netty.channel.ChannelInitializer;%0Aimport io.netty.channel.ChannelPipeline;%0Aimport io.netty.channel.socket.SocketChannel;%0Aimport io.netty.handler.codec.string.StringDecoder;%0Aimport io.netty.handler.codec.string.StringEncoder;%0A%0A/**%0A * Created by form on 2017-07-20.%0A */%0Apublic class ServerInitHandler extends ChannelInitializer%3CSocketChannel%3E%7B%0A    @Override%0A    protected void initChannel(SocketChannel socketChannel) throws Exception %7B%0A        ChannelPipeline pipeline = socketChannel.pipeline();%0A        pipeline.addLast(%22docode%22,new StringDecoder());%0A        pipeline.addLast(%22encode%22,new StringEncoder());%0A        pipeline.addLast(%22chat%22,new ServerChatHandler());%0A%0A    %7D%0A%7D%0A

Create ServerInitHandler.java