package com.its.vds.xnettcp.vds.process;

import com.its.vds.xnettcp.vds.protocol.enums.eVdsOpCode;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class TcpServerSendData {

    private long requestTime;
    private eVdsOpCode opCode;
    private Object data;

    public TcpServerSendData(eVdsOpCode opCode, Object data) {
        this.requestTime = System.currentTimeMillis();
        this.opCode = opCode;
        this.data = data;
    }

    public long elapsed() {
        return System.currentTimeMillis() - this.requestTime;
    }

}
