package com.its.dsrc.xnettcp.dsrc.process.response;

import com.beanit.asn1dsrc.dsrc.C2CAuthenticatedMessage;
import com.its.app.utils.NettyUtils;
import com.its.dsrc.entity.TbRseCtlr;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class NullResponse implements DsrcAsn1Response {
    private TbRseCtlr obj;
    private ChannelHandlerContext ctx;
    private C2CAuthenticatedMessage c2c;

    public NullResponse(TbRseCtlr obj, ChannelHandlerContext ctx, C2CAuthenticatedMessage c2c) {
        this.obj = obj;
        this.ctx = ctx;
        this.c2c = c2c;
    }

    @Override
    public boolean response() {
        // 처리내용 없음. 여기들어오면 패킷이 잘못된 것임
        String ipAddress = NettyUtils.getRemoteIpAddress(this.ctx.channel());
        log.info("NullResponse.response: {}", ipAddress);
        return true;
    }
}
