Class UDPPacket
- java.lang.Object
-
- com.biglybt.core.networkmanager.impl.udp.UDPPacket
-
public class UDPPacket extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int
alt_sequence
private boolean
auto_retransmit
private byte[]
buffer
private byte
command
static byte
COMMAND_ACK
static byte
COMMAND_CLOSE
static byte
COMMAND_CRYPTO
static byte
COMMAND_DATA
static byte
COMMAND_STAT_REPLY
static byte
COMMAND_STAT_REQUEST
private UDPConnection
connection
static byte
FLAG_LAZY_ACK
static byte
FLAG_NONE
static byte
PROTOCOL_VERSION
private boolean
received
private short
resend_count
private long
send_tick_count
private short
sent_count
private int
sequence
private long
unack_in_sequence_count
-
Constructor Summary
Constructors Modifier Constructor Description protected
UDPPacket(UDPConnection _connection, int[] _sequences, byte _command, byte[] _buffer, long _unack_in_sequence_count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getAlternativeSequence()
protected byte[]
getBuffer()
protected byte
getCommand()
protected UDPConnection
getConnection()
protected short
getResendCount()
protected long
getSendTickCount()
protected int
getSentCount()
protected int
getSequence()
protected java.lang.String
getString()
protected long
getUnAckInSequenceCount()
protected boolean
hasBeenReceived()
protected boolean
isAutoRetransmit()
protected void
resent()
protected short
sent(long tick_count)
protected void
setAutoRetransmit(boolean b)
protected void
setHasBeenReceived()
-
-
-
Field Detail
-
PROTOCOL_VERSION
public static final byte PROTOCOL_VERSION
- See Also:
- Constant Field Values
-
COMMAND_CRYPTO
public static final byte COMMAND_CRYPTO
- See Also:
- Constant Field Values
-
COMMAND_DATA
public static final byte COMMAND_DATA
- See Also:
- Constant Field Values
-
COMMAND_ACK
public static final byte COMMAND_ACK
- See Also:
- Constant Field Values
-
COMMAND_CLOSE
public static final byte COMMAND_CLOSE
- See Also:
- Constant Field Values
-
COMMAND_STAT_REQUEST
public static final byte COMMAND_STAT_REQUEST
- See Also:
- Constant Field Values
-
COMMAND_STAT_REPLY
public static final byte COMMAND_STAT_REPLY
- See Also:
- Constant Field Values
-
FLAG_NONE
public static final byte FLAG_NONE
- See Also:
- Constant Field Values
-
FLAG_LAZY_ACK
public static final byte FLAG_LAZY_ACK
- See Also:
- Constant Field Values
-
connection
private final UDPConnection connection
-
sequence
private final int sequence
-
alt_sequence
private final int alt_sequence
-
command
private final byte command
-
buffer
private final byte[] buffer
-
unack_in_sequence_count
private final long unack_in_sequence_count
-
auto_retransmit
private boolean auto_retransmit
-
sent_count
private short sent_count
-
resend_count
private short resend_count
-
received
private boolean received
-
send_tick_count
private long send_tick_count
-
-
Constructor Detail
-
UDPPacket
protected UDPPacket(UDPConnection _connection, int[] _sequences, byte _command, byte[] _buffer, long _unack_in_sequence_count)
-
-
Method Detail
-
getConnection
protected UDPConnection getConnection()
-
getSequence
protected int getSequence()
-
getAlternativeSequence
protected int getAlternativeSequence()
-
getCommand
protected byte getCommand()
-
getBuffer
protected byte[] getBuffer()
-
getUnAckInSequenceCount
protected long getUnAckInSequenceCount()
-
isAutoRetransmit
protected boolean isAutoRetransmit()
-
setAutoRetransmit
protected void setAutoRetransmit(boolean b)
-
sent
protected short sent(long tick_count)
-
getResendCount
protected short getResendCount()
-
resent
protected void resent()
-
getSendTickCount
protected long getSendTickCount()
-
setHasBeenReceived
protected void setHasBeenReceived()
-
hasBeenReceived
protected boolean hasBeenReceived()
-
getSentCount
protected int getSentCount()
-
getString
protected java.lang.String getString()
-
-