DHTUDPPacketReplyStatspublic class DHTUDPPacketReplyStats extends DHTUDPPacketReply
Fields Summary |
---|
private int | stats_type | private com.aelitis.azureus.core.dht.transport.DHTTransportFullStats | original_stats | private byte[] | new_stats |
Constructors Summary |
---|
public DHTUDPPacketReplyStats(DHTTransportUDPImpl transport, int trans_id, long conn_id, com.aelitis.azureus.core.dht.transport.DHTTransportContact local_contact, com.aelitis.azureus.core.dht.transport.DHTTransportContact remote_contact)
super( transport, DHTUDPPacketHelper.ACT_REPLY_STATS, trans_id, conn_id, local_contact, remote_contact );
| protected DHTUDPPacketReplyStats(com.aelitis.azureus.core.dht.transport.udp.impl.packethandler.DHTUDPPacketNetworkHandler network_handler, DataInputStream is, int trans_id)
super( network_handler, is, DHTUDPPacketHelper.ACT_REPLY_STATS, trans_id );
if ( getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_GENERIC_NETPOS ){
stats_type = is.readInt();
if ( stats_type == DHTUDPPacketRequestStats.STATS_TYPE_ORIGINAL ){
original_stats = DHTUDPUtils.deserialiseStats( getProtocolVersion(), is );
}else{
new_stats = DHTUDPUtils.deserialiseByteArray( is, 65535 );
}
}else{
original_stats = DHTUDPUtils.deserialiseStats( getProtocolVersion(), is );
}
|
Methods Summary |
---|
public byte[] | getNewStats()
return( new_stats );
| public com.aelitis.azureus.core.dht.transport.DHTTransportFullStats | getOriginalStats()
return( original_stats );
| public int | getStatsType()
return( stats_type );
| public void | serialise(java.io.DataOutputStream os)
super.serialise(os);
if ( getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_GENERIC_NETPOS ){
os.writeInt( stats_type );
if ( stats_type == DHTUDPPacketRequestStats.STATS_TYPE_ORIGINAL ){
DHTUDPUtils.serialiseStats( getProtocolVersion(), os, original_stats );
}else{
DHTUDPUtils.serialiseByteArray( os, new_stats, 65535 );
}
}else{
DHTUDPUtils.serialiseStats( getProtocolVersion(), os, original_stats );
}
| public void | setNewStats(byte[] _stats, int _stats_type)
stats_type = _stats_type;
new_stats = _stats;
| public void | setOriginalStats(com.aelitis.azureus.core.dht.transport.DHTTransportFullStats _stats)
stats_type = DHTUDPPacketRequestStats.STATS_TYPE_ORIGINAL;
original_stats = _stats;
|
|