riku
2021-03-01 7a3654aaebf1d75303a90f3dc574881b0199779c
src/main/kotlin/com/flightfeather/uav/socket/SocketServerClient.kt
@@ -6,6 +6,7 @@
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
@@ -41,7 +42,7 @@
                        override fun initChannel(p0: NioSocketChannel?) {
                            p0?.pipeline()
//                                    ?.addLast("decoder", StringDecoder())
                                    ?.addLast(ObdByteDataDecoder())
                                    ?.addLast(UAVByteDataDecoder())
                                    ?.addLast("encoder", StringEncoder(Charset.forName("UTF-8")))
                                    ?.addLast(ServerHandler())
                        }