package org.kne.cloud.network.minecraft;

import java.io.IOException;

import org.kne.io.VarDataInputStream;
import org.kne.io.VarDataOutputStream;

public class MinecraftPongPacket extends MinecraftPacket{
	private long time;
	public long getTime() {
		return time;
	}
	public MinecraftPongPacket( long time) {
		super(PING_PONG);
		this.time = time;
	}
	@Override
	public String toString() {
		return "MinecraftPongPacket [time=" + time + "]";
	}
	public MinecraftPongPacket() {
		super(PING_PONG);
	}
	@Override
	protected void writeToStream(VarDataOutputStream dto) throws IOException {
		super.writeToStream(dto);
		dto.writeLong(time);
	}
	@Override
	protected void readFromStream(VarDataInputStream din) throws IOException {
		super.readFromStream(din);
		time=din.readLong();
	}
}
