FileDocCategorySizeDatePackage
UDPPacket.javaAPI DocAzureus 3.0.3.43475Mon Jul 03 08:51:14 BST 2006com.aelitis.azureus.core.networkmanager.impl.udp

UDPPacket

public class UDPPacket extends Object

Fields Summary
public static final byte
PROTOCOL_VERSION
public static final byte
COMMAND_CRYPTO
public static final byte
COMMAND_DATA
public static final byte
COMMAND_ACK
public static final byte
COMMAND_CLOSE
public static final byte
COMMAND_STAT_REQUEST
public static final byte
COMMAND_STAT_REPLY
public static final byte
FLAG_NONE
public static final byte
FLAG_LAZY_ACK
private final UDPConnection
connection
private final int
sequence
private final int
alt_sequence
private final byte
command
private final byte[]
buffer
private final long
unack_in_sequence_count
private boolean
auto_retransmit
private short
sent_count
private short
resend_count
private boolean
received
private long
send_tick_count
Constructors Summary
protected UDPPacket(UDPConnection _connection, int[] _sequences, byte _command, byte[] _buffer, long _unack_in_sequence_count)

	
	
	
			
					
					
					
					 
	
		connection		= _connection;
		sequence		= _sequences[1];
		alt_sequence	= _sequences[3];
		command			= _command;
		buffer			= _buffer;
		
		unack_in_sequence_count	= _unack_in_sequence_count;
	
Methods Summary
protected intgetAlternativeSequence()

		return( alt_sequence );
	
protected byte[]getBuffer()

		return( buffer );
	
protected bytegetCommand()

		return( command );
	
protected UDPConnectiongetConnection()

		return( connection );
	
protected shortgetResendCount()

		return( resend_count );
	
protected longgetSendTickCount()

		return( send_tick_count );
	
protected intgetSentCount()

		return( sent_count );
	
protected intgetSequence()

		return( sequence );
	
protected java.lang.StringgetString()

		return( "seq=" + sequence + ",type=" + command + ",retrans=" + auto_retransmit + ",sent=" + sent_count +",len=" + buffer.length );
	
protected longgetUnAckInSequenceCount()

		return( unack_in_sequence_count );
	
protected booleanhasBeenReceived()

		return( received );
	
protected booleanisAutoRetransmit()

		return( auto_retransmit );
	
protected voidresent()

		resend_count++ ;
	
protected shortsent(long tick_count)

		sent_count++;
		
		send_tick_count = tick_count;
		
		return( sent_count );
	
protected voidsetAutoRetransmit(boolean b)

		auto_retransmit	= b;
	
protected voidsetHasBeenReceived()

		received	= true;