new NetworkNack()
NetworkNack represents a network Nack packet and includes a Nack reason.
- Source:
Members
(static) Reason
A NetworkNack.Reason specifies the reason in a NetworkNack packet. If the
reason code in the packet is not a recognized enum value, then we use
Reason.OTHER_CODE and you can call getOtherReasonCode(). We do this to keep
the recognized reason values independent of packet encoding formats.
- Source:
Methods
(static) getFirstHeader(lpPacket) → {NetworkNack}
Get the first header field in lpPacket which is a NetworkNack. This is
an internal method which the application normally would not use.
Parameters:
Name | Type | Description |
---|---|---|
lpPacket |
LpPacket | The LpPacket with the header fields to search. |
- Source:
Returns:
The first NetworkNack header field, or null if not
found.
- Type
- NetworkNack
getOtherReasonCode() → {number}
Get the reason code from the packet which is other than a recognized
Reason enum value. This is only meaningful if getReason() is
Reason.OTHER_CODE.
- Source:
Returns:
The reason code.
- Type
- number
getReason() → {number}
Get the network Nack reason.
- Source:
Returns:
The reason enum value from NetworkNack.Reason. If this is
Reason.OTHER_CODE, then call getOtherReasonCode() to get the unrecognized
reason code.
- Type
- number
setOtherReasonCode(otherReasonCode)
Set the packet's reason code to use when the reason enum is
Reason.OTHER_CODE. If the packet's reason code is a recognized enum value,
just call setReason().
Parameters:
Name | Type | Description |
---|---|---|
otherReasonCode |
number | The packet's unrecognized reason code, which must be non-negative. |
- Source:
setReason(reason)
Set the network Nack reason.
Parameters:
Name | Type | Description |
---|---|---|
reason |
number | The network Nack reason enum value from NetworkNack.Reason. If the packet's reason code is not a recognized Reason enum value, use Reason.OTHER_CODE and call setOtherReasonCode(). |
- Source: