Encode SNMP packet for sending.

Namespace: SnmpSharpNet
Assembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.9.1.0 (0.9.1)

Syntax

C#
public override byte[] encode()
Visual Basic
Public Overrides Function encode As Byte()
Visual C++
public:
virtual array<unsigned char>^ encode() override

Return Value

BER encoded SNMP packet.

Exceptions

ExceptionCondition
SnmpSharpNet..::..SnmpInvalidPduTypeExceptionThrown when PDU being encoded is not a valid SNMP version 1 PDU. Acceptable protocol version 1 operations are GET, GET-NEXT, SET and RESPONSE.

See Also