package com.pwt.netty.common.vehicle2old.server;

import com.pwt.netty.common.vehicle2old.ResponseData;
import io.netty.buffer.ByteBuf;
import lombok.Data;

/***
 * 心跳响应数据
 */
@Data
public class HeartBeatResponseData extends ResponseData {

    private int status;

    @Override
    protected void encodeInternal(ByteBuf byteBuf) {
        byteBuf.writeByte(status);
    }

    @Override
    protected void decodeInternal(ByteBuf byteBuf) {
        this.status = byteBuf.readUnsignedByte();
    }
}
