Constructor
new Packet(options)
Creates a new packet.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Options for the constructor. Properties
|
Members
ackNum :number
The sequence number to acknowledge.
isAck :boolean
true if the packet is an acknowledgment, false otherwise.
isCAck :boolean
true if the packet is a cumulative acknowledgment.
isCorrupted :booblean
true if the packet is corrupted, false if not.
receiver :AbstractARQNode
The receiver of the packet.
sender :AbstractARQNode
The sender of the packet.
seqNum :number
The sequence number of the packet.
wasReSent :boolean
true if the packet was re-sent.
Methods
damage()
Turns packet.isCorrupted true.