NetworkNack Class¶
A NetworkNack object represents a network Nack packet and includes a Nack reason. It is provided in the OnNetworkNack callback from Face.expressInterest.
| [C++]: | #include <ndn-cpp/network-nack.hpp>Namespace:  ndn | 
|---|---|
| [Python]: | Module: pyndn | 
| [Java]: | Package: net.named_data.jndn | 
NetworkNack.getOtherReasonCode Method¶
Get the reason code from the packet which is other than a recognized Reason enum value. This is only meaningful if getReason() is OTHER_CODE.
| [C++]: | int getOtherReasonCode() const;
 | 
|---|---|
| [Python]: | # Returns int
def getOtherReasonCode(self)
 | 
| [JavaScript]: | // Returns number
NetworkNack.prototype.getOtherReasonCode = function()
 | 
| [Java]: | public final int getOtherReasonCode()
 | 
| Returns: | The reason code. | 
NetworkNack.getReason Method¶
Get the network Nack reason.
| [C++]: | ndn_NetworkNackReason getReason() const;
 | 
|---|---|
| [Python]: | # Returns int
def getReason(self)
 | 
| [JavaScript]: | // Returns number
NetworkNack.prototype.getReason = function()
 | 
| [Java]: | public final NetworkNack.Reason getReason()
 | 
| Returns: | The reason enum value which is NONE, CONGESTION, DUPLICATE, NO_ROUTE or OTHER_CODE as follows. If this returns OTHER_CODE, then call getOtherReasonCode() to get the unrecognized reason code. 
 | 
