DHTUDPPacketRequestStorepublic class DHTUDPPacketRequestStore extends DHTUDPPacketRequest
Fields Summary |
---|
public static final int | MAX_KEYS_PER_PACKET | public static final int | MAX_VALUES_PER_KEY | private int | random_id | private byte[] | keys | private com.aelitis.azureus.core.dht.transport.DHTTransportValue[] | value_sets |
Constructors Summary |
---|
public DHTUDPPacketRequestStore(DHTTransportUDPImpl _transport, long _connection_id, DHTTransportUDPContactImpl _local_contact, DHTTransportUDPContactImpl _remote_contact)
super( _transport, DHTUDPPacketHelper.ACT_REQUEST_STORE, _connection_id, _local_contact, _remote_contact );
| protected DHTUDPPacketRequestStore(com.aelitis.azureus.core.dht.transport.udp.impl.packethandler.DHTUDPPacketNetworkHandler network_handler, DataInputStream is, long con_id, int trans_id)
super( network_handler, is, DHTUDPPacketHelper.ACT_REQUEST_STORE, con_id, trans_id );
if ( getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_ANTI_SPOOF ){
random_id = is.readInt();
}
keys = DHTUDPUtils.deserialiseByteArrayArray( is, MAX_KEYS_PER_PACKET );
// times receieved are adjusted by + skew
value_sets = DHTUDPUtils.deserialiseTransportValuesArray( this, is, getClockSkew(), MAX_VALUES_PER_KEY );
super.postDeserialise(is);
|
Methods Summary |
---|
protected byte[][] | getKeys()
return( keys );
| protected int | getRandomID()
return( random_id );
| public java.lang.String | getString()
return( super.getString());
| protected com.aelitis.azureus.core.dht.transport.DHTTransportValue[][] | getValueSets()
return( value_sets );
| public void | serialise(java.io.DataOutputStream os)
super.serialise(os);
if ( getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_ANTI_SPOOF ){
os.writeInt( random_id );
}
DHTUDPUtils.serialiseByteArrayArray( os, keys, MAX_KEYS_PER_PACKET );
try{
DHTUDPUtils.serialiseTransportValuesArray( this, os, value_sets, 0, MAX_VALUES_PER_KEY );
}catch( DHTTransportException e ){
throw( new IOException( e.getMessage()));
}
super.postSerialise( os );
| protected void | setKeys(byte[][] _key)
keys = _key;
| protected void | setRandomID(int _random_id)
random_id = _random_id;
| protected void | setValueSets(com.aelitis.azureus.core.dht.transport.DHTTransportValue[][] _values)
value_sets = _values;
|
|