FileDocCategorySizeDatePackage
PRUDPPacketRequestAnnounce2.javaAPI DocAzureus 3.0.3.44261Thu Jan 05 05:43:26 GMT 2006org.gudy.azureus2.core3.tracker.protocol.udp

PRUDPPacketRequestAnnounce2

public class PRUDPPacketRequestAnnounce2 extends com.aelitis.net.udp.uc.PRUDPPacketRequest
author
parg

Fields Summary
public static final int
EV_STARTED
public static final int
EV_STOPPED
public static final int
EV_COMPLETED
public static final int
EV_UPDATE
protected byte[]
hash
protected byte[]
peer_id
protected long
downloaded
protected int
event
protected int
key
protected int
num_want
protected long
left
protected short
port
protected long
uploaded
protected int
ip_address
Constructors Summary
public PRUDPPacketRequestAnnounce2(long con_id)

	
	
	
						 
	
		super( PRUDPPacketTracker.ACT_REQUEST_ANNOUNCE, con_id );
	
protected PRUDPPacketRequestAnnounce2(DataInputStream is, long con_id, int trans_id)

		super( PRUDPPacketTracker.ACT_REQUEST_ANNOUNCE, con_id, trans_id );
		
		hash 	= new byte[20];
		peer_id	= new byte[20];
		
		is.read( hash );
		is.read( peer_id );
		
		downloaded 	= is.readLong();
		left		= is.readLong();
		uploaded	= is.readLong();
		event 		= is.readInt();
		ip_address	= is.readInt();
		key			= is.readInt();
		num_want	= is.readInt();
		port		= is.readShort();
	
Methods Summary
public longgetDownloaded()

		return( downloaded );
	
public intgetEvent()

		return( event );
	
public byte[]getHash()

		return( hash );
	
public intgetIPAddress()

		return( ip_address );
	
public intgetKey()

		return( key );
	
public longgetLeft()

		return( left );
	
public intgetNumWant()

		return( num_want );
	
public byte[]getPeerId()

		return( peer_id );
	
public shortgetPort()

		return( port );
	
public java.lang.StringgetString()

		return( super.getString()).concat("[").concat(
					"hash="+ByteFormatter.nicePrint( hash, true )+
					"peer="+ByteFormatter.nicePrint( peer_id, true )+
					"dl="+downloaded+
					"ev="+event+
					"ip="+ip_address+
					"key="+key+
					"nw="+num_want+
					"left="+left+
					"port="+port+
					"ul="+uploaded+"]");
	
public longgetUploaded()

		return( uploaded );
	
public voidserialise(java.io.DataOutputStream os)

		super.serialise(os);
		
		os.write( hash );
		os.write( peer_id );
		os.writeLong( downloaded );
		os.writeLong( left );
		os.writeLong( uploaded );
		os.writeInt( event );
		os.writeInt( ip_address );
		os.writeInt( key );
		os.writeInt( num_want );
		os.writeShort( port );
	
public voidsetDetails(byte[] _hash, byte[] _peer_id, long _downloaded, int _event, int _ip_address, int _key, int _num_want, long _left, short _port, long _uploaded)

		hash		= _hash;
		peer_id		= _peer_id;
		downloaded	= _downloaded;
		event		= _event;
		ip_address	= _ip_address;
		key			= _key;
		num_want	= _num_want;
		left		= _left;
		port		= _port;
		uploaded	= _uploaded;