public synchronized void recordAndAddSequenceNumberToOutgoingPacket(Packet packet) {
		//ignore null packets
		if(packet == null)
			return;

		//add sequence number to packet
		lastSentPacketSequenceNumber = Packet.nextSequenceNumber(lastSentPacketSequenceNumber);
		packet.setSequenceNumber(lastSentPacketSequenceNumber);

		//add packet to array of sent packets
		lastSentPacketIndex++;
		if(lastSentPacketIndex == PacketRecorder.NUM_SENT_PACKETS_STORED)
			lastSentPacketIndex = 0;
		sentPackets[lastSentPacketIndex] = new PacketReceipt(packet);
	}