package cz.vutbr.feec.session.ping;

import java.io.IOException;

import org.savarese.vserv.tcpip.ICMPEchoPacket;

/**
 * The listener interface for receiving IPingEchoReply events.
 * The class that is interested in processing a IPingEchoReply
 * event implements this interface, and the object created
 * with that class is registered with a component using the
 * component's <code>addIPingEchoReplyListener<code> method. When
 * the IPingEchoReply event occurs, that object's appropriate
 * method is invoked.
 * 
 * @see IPingEchoReplyEvent
 */
public interface IPingEchoReplyListener {
	
	/**
	 * Notify echo reply.
	 * 
	 * @param packet the packet
	 * @param data the data
	 * @param dataOffset the data offset
	 * @param srcAddress the src address
	 * 
	 * @throws IOException Signals that an I/O exception has occurred.
	 */
	public void notifyEchoReply(ICMPEchoPacket packet, byte[] data,
			int dataOffset, byte[] srcAddress) throws IOException;
}
