| | |
| | | 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 |
| | |
| | | |
| | | 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) |
| | | } |