riku
2019-09-05 28b10b7255483c8e2eb5e3e828f8cda658e94c44
src/main/kotlin/com/flightfeather/obd/socket/ServerHandler.kt
@@ -1,8 +1,5 @@
package com.flightfeather.obd.socket
import com.flightfeather.obd.domain.entity.ObdData
import com.google.gson.Gson
import io.netty.channel.ChannelHandler
import io.netty.channel.ChannelHandlerContext
import io.netty.channel.ChannelInboundHandlerAdapter
import io.netty.util.AttributeKey
@@ -22,6 +19,7 @@
    override fun channelRead(ctx: ChannelHandlerContext?, msg: Any?) {
        super.channelRead(ctx, msg)
        println("------收到的原始数据:[ip:${ctx?.channel()?.remoteAddress()}]\r\n$msg")
        if (msg is String) {
            MessageManager().dealMsg(msg, ctx)
        }