| | |
| | | import io.netty.channel.nio.NioEventLoopGroup |
| | | import io.netty.channel.socket.nio.NioServerSocketChannel |
| | | import io.netty.channel.socket.nio.NioSocketChannel |
| | | import io.netty.handler.codec.string.StringDecoder |
| | | import io.netty.handler.codec.string.StringEncoder |
| | | import java.nio.charset.Charset |
| | | |
| | |
| | | override fun initChannel(p0: NioSocketChannel?) { |
| | | p0?.pipeline() |
| | | // ?.addLast("decoder", StringDecoder()) |
| | | ?.addLast(ObdByteDataDecoder()) |
| | | ?.addLast(UAVByteDataDecoder()) |
| | | ?.addLast("encoder", StringEncoder(Charset.forName("UTF-8"))) |
| | | ?.addLast(ServerHandler()) |
| | | } |