mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-06 02:50:13 +08:00
@@ -8,7 +8,6 @@ import com.jsowell.netty.service.electricbicycles.EBikeBusinessService;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.*;
|
import io.netty.channel.*;
|
||||||
import io.netty.handler.timeout.ReadTimeoutException;
|
import io.netty.handler.timeout.ReadTimeoutException;
|
||||||
import io.netty.util.ReferenceCountUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -61,7 +60,6 @@ public class ElectricBicyclesServerHandler extends ChannelInboundHandlerAdapter
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void channelRead(ChannelHandlerContext ctx, Object message) throws Exception {
|
public void channelRead(ChannelHandlerContext ctx, Object message) throws Exception {
|
||||||
try {
|
|
||||||
byte[] msg = (byte[]) message;
|
byte[] msg = (byte[]) message;
|
||||||
// 处理数据
|
// 处理数据
|
||||||
byte[] response = eBikeService.process(msg, ctx);
|
byte[] response = eBikeService.process(msg, ctx);
|
||||||
@@ -81,10 +79,6 @@ public class ElectricBicyclesServerHandler extends ChannelInboundHandlerAdapter
|
|||||||
// BytesUtil.binary(response, 16));
|
// BytesUtil.binary(response, 16));
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
ReferenceCountUtil.release(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user