Encode SNMP packet for sending.
Namespace:
SnmpSharpNetAssembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax
| C# | Visual Basic | Visual C++ |
public override byte[] encode()
Public Overrides Function encode As Byte()
public: virtual array<unsigned char>^ encode() override
Return Value
BER encoded SNMP packet.
Exceptions
| Exception | Condition |
|---|---|
| SnmpInvalidPduTypeException | Thrown when PDU being encoded is not a valid SNMP version 1 PDU. Acceptable protocol version 1 operations are GET, GET-NEXT, SET and RESPONSE. |