mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 电单车协议
This commit is contained in:
@@ -1,27 +1,18 @@
|
||||
package com.jsowell.netty.server.electricbicycles;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.netty.domain.ChargingPileMessage;
|
||||
import com.jsowell.netty.domain.EBikeMessage;
|
||||
import io.netty.channel.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.time.Instant;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@ChannelHandler.Sharable
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ChargingPileHandler extends SimpleChannelInboundHandler<ChargingPileMessage> {
|
||||
public class ChargingPileHandler extends SimpleChannelInboundHandler<EBikeMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, ChargingPileMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, EBikeMessage msg) throws Exception {
|
||||
log.info("收到消息, channelId:{}, msg:{}", ctx.channel().id().toString(), JSON.toJSONString(msg));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user