@@ -0,0 +1,847 @@
+package com.client;%0A%0Aimport io.netty.channel.ChannelInitializer;%0Aimport io.netty.channel.ChannelPipeline;%0Aimport io.netty.channel.socket.SocketChannel;%0Aimport io.netty.handler.codec.http.HttpClientCodec;%0Aimport io.netty.handler.codec.string.StringDecoder;%0Aimport io.netty.handler.codec.string.StringEncoder;%0A%0Aimport javax.swing.*;%0A%0A/**%0A * @Author JamH%0A * Created by form on 2017-07-20.%0A */%0Apublic class InitHandler extends ChannelInitializer%3CSocketChannel%3E %7B%0A%0A    @Override%0A    protected void initChannel(SocketChannel socketChannel) throws Exception%7B%0A        ChannelPipeline pipeline = socketChannel.pipeline();%0A        pipeline.addLast(%22stringD%22, new StringDecoder());%0A        pipeline.addLast(%22stringC%22, new StringEncoder());%0A        pipeline.addLast(%22http%22, new HttpClientCodec());%0A        pipeline.addLast(%22chat%22, new ChatHandler());%0A    %7D%0A%7D%0A

Create InitHandler.java