package com.ruoyi.dataInterchange.model;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBufUtil;
|
import io.netty.buffer.Unpooled;
|
import lombok.Data;
|
|
/**
|
* 从链路断开通知
|
* @author zhibing.pu
|
* @Date 2025/2/24 11:12
|
*/
|
@Data
|
public class DOWNDisconnectInform {
|
/**
|
* 错误代码
|
* 0x00:无法连接下级平台指定的服务无IP与端口
|
* 0x01:上级平台客户端与下级平台服务端断开
|
* 0xFF:其他错误
|
*/
|
private int errorCode;
|
|
|
public byte[] encode() {
|
ByteBuf byteBuf = Unpooled.buffer(1);
|
byteBuf.writeInt(this.getErrorCode());
|
byte[] bytes = ByteBufUtil.getBytes(byteBuf);
|
byteBuf.release();
|
return bytes;
|
}
|
}
|