Class DHTUDPPacketReply
- java.lang.Object
-
- com.biglybt.net.udp.uc.PRUDPPacket
-
- com.biglybt.net.udp.uc.PRUDPPacketReply
-
- com.biglybt.core.dht.transport.udp.impl.DHTUDPPacketReply
-
- All Implemented Interfaces:
DHTUDPPacket
- Direct Known Subclasses:
DHTUDPPacketReplyError
,DHTUDPPacketReplyFindNode
,DHTUDPPacketReplyFindValue
,DHTUDPPacketReplyKeyBlock
,DHTUDPPacketReplyPing
,DHTUDPPacketReplyQueryStorage
,DHTUDPPacketReplyStats
,DHTUDPPacketReplyStore
public class DHTUDPPacketReply extends PRUDPPacketReply implements DHTUDPPacket
-
-
Field Summary
Fields Modifier and Type Field Description private long
connection_id
static int
DHT_HEADER_SIZE
private byte
flags
private byte
flags2
private int
network
private DHTNetworkPosition[]
network_positions
private short
processing_time
private byte
protocol_version
private long
request_receive_time
private long
skew
private int
target_instance_id
private DHTTransportUDPImpl
transport
private byte
vendor_id
-
Fields inherited from class com.biglybt.net.udp.uc.PRUDPPacketReply
PR_HEADER_SIZE
-
Fields inherited from class com.biglybt.net.udp.uc.PRUDPPacket
DEFAULT_UDP_TIMEOUT, MAX_PACKET_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description DHTUDPPacketReply(DHTTransportUDPImpl _transport, int _type, DHTUDPPacketRequest _request, DHTTransportContact _local_contact, DHTTransportContact _remote_contact)
protected
DHTUDPPacketReply(DHTUDPPacketNetworkHandler network_handler, java.net.InetSocketAddress originator, java.io.DataInputStream is, int type, int trans_id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
getClockSkew()
long
getConnectionId()
byte
getGenericFlags()
byte
getGenericFlags2()
int
getNetwork()
protected DHTNetworkPosition[]
getNetworkPositions()
long
getProcessingTime()
byte
getProtocolVersion()
java.lang.String
getString()
protected int
getTargetInstanceID()
DHTTransportUDPImpl
getTransport()
protected byte
getVendorID()
void
serialise(java.io.DataOutputStream os)
void
setNetwork(int _network)
protected void
setNetworkPositions(DHTNetworkPosition[] _network_positions)
-
Methods inherited from class com.biglybt.net.udp.uc.PRUDPPacketReply
deserialiseReply, registerDecoders
-
Methods inherited from class com.biglybt.net.udp.uc.PRUDPPacket
getAction, getAddress, getMinimumProtocolVersion, getPreviousPacket, getSerialisedSize, getTransactionId, hasContinuation, setAddress, setPreviousPacket, setSerialisedSize
-
-
-
-
Field Detail
-
DHT_HEADER_SIZE
public static final int DHT_HEADER_SIZE
- See Also:
- Constant Field Values
-
transport
private DHTTransportUDPImpl transport
-
connection_id
private long connection_id
-
protocol_version
private byte protocol_version
-
vendor_id
private byte vendor_id
-
network
private int network
-
target_instance_id
private int target_instance_id
-
flags
private byte flags
-
flags2
private byte flags2
-
skew
private long skew
-
network_positions
private DHTNetworkPosition[] network_positions
-
processing_time
private short processing_time
-
request_receive_time
private long request_receive_time
-
-
Constructor Detail
-
DHTUDPPacketReply
public DHTUDPPacketReply(DHTTransportUDPImpl _transport, int _type, DHTUDPPacketRequest _request, DHTTransportContact _local_contact, DHTTransportContact _remote_contact)
-
DHTUDPPacketReply
protected DHTUDPPacketReply(DHTUDPPacketNetworkHandler network_handler, java.net.InetSocketAddress originator, java.io.DataInputStream is, int type, int trans_id) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getTransport
public DHTTransportUDPImpl getTransport()
- Specified by:
getTransport
in interfaceDHTUDPPacket
-
getTargetInstanceID
protected int getTargetInstanceID()
-
getConnectionId
public long getConnectionId()
-
getClockSkew
protected long getClockSkew()
-
getProtocolVersion
public byte getProtocolVersion()
- Specified by:
getProtocolVersion
in interfaceDHTUDPPacket
-
getVendorID
protected byte getVendorID()
-
getNetwork
public int getNetwork()
-
getGenericFlags
public byte getGenericFlags()
- Specified by:
getGenericFlags
in interfaceDHTUDPPacket
-
getGenericFlags2
public byte getGenericFlags2()
- Specified by:
getGenericFlags2
in interfaceDHTUDPPacket
-
setNetwork
public void setNetwork(int _network)
-
getNetworkPositions
protected DHTNetworkPosition[] getNetworkPositions()
-
setNetworkPositions
protected void setNetworkPositions(DHTNetworkPosition[] _network_positions)
-
serialise
public void serialise(java.io.DataOutputStream os) throws java.io.IOException
- Overrides:
serialise
in classPRUDPPacketReply
- Throws:
java.io.IOException
-
getProcessingTime
public long getProcessingTime()
-
getString
public java.lang.String getString()
- Overrides:
getString
in classPRUDPPacketReply
-
-