Table of Contents

Class Discovery

Namespace
Lextm.SharpSnmpLib.Messaging
Assembly
SharpSnmpLib.dll

Discovery class that participates in SNMP v3 discovery process.

public sealed class Discovery
Inheritance
Discovery
Inherited Members

Constructors

Discovery(int, int, int)

Initializes a new instance of the Discovery class.

public Discovery(int messageId, int requestId, int maxMessageSize)

Parameters

messageId int

The message id.

requestId int

The request id.

maxMessageSize int

The max size of message.

Discovery(int, int, int, SnmpType)

Initializes a new instance of the Discovery class.

public Discovery(int messageId, int requestId, int maxMessageSize, SnmpType type)

Parameters

messageId int

The message id.

requestId int

The request id.

maxMessageSize int

The max size of message.

type SnmpType

Message type.

Methods

GetResponse(int, IPEndPoint)

Gets the response.

public ReportMessage GetResponse(int timeout, IPEndPoint receiver)

Parameters

timeout int

The time-out value, in milliseconds. The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period.

receiver IPEndPoint

The receiver.

Returns

ReportMessage

GetResponseAsync(IPEndPoint)

Gets the response.

public Task<ReportMessage> GetResponseAsync(IPEndPoint receiver)

Parameters

receiver IPEndPoint

The receiver.

Returns

Task<ReportMessage>

GetResponseAsync(IPEndPoint, CancellationToken)

Gets the response.

public Task<ReportMessage> GetResponseAsync(IPEndPoint receiver, CancellationToken token)

Parameters

receiver IPEndPoint

The receiver.

token CancellationToken

The cancellation token.

Returns

Task<ReportMessage>

ToBytes()

Converts to the bytes.

public byte[] ToBytes()

Returns

byte[]

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.