PowerSNMP for .NET
Receive(RequestMessage,IPEndPoint) Method




A GetMessage, GetNextMessage, GetBulkMessage, InformMessage or SetMessage.
The IPEndPoint of the target agent or manager. Use null when a broadcast IPEndPoint was used or the origin of the packet is immaterial.
Reads and decodes the next SNMP message with matching StandardMessage.Id or Id. The IPEndPoint of the response must match the destination.
Syntax
Public Overloads Function Receive( _
   ByVal request As RequestMessage, _
   ByVal remoteEP As IPEndPoint _
) As ResponseMessage
Dim instance As SnmpSocket
Dim request As RequestMessage
Dim remoteEP As IPEndPoint
Dim value As ResponseMessage
 
value = instance.Receive(request, remoteEP)

Parameters

request
A GetMessage, GetNextMessage, GetBulkMessage, InformMessage or SetMessage.
remoteEP
The IPEndPoint of the target agent or manager. Use null when a broadcast IPEndPoint was used or the origin of the packet is immaterial.

Return Value

A ResponseMessage received from the remote host.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionThe request parameter is null.
System.Net.Sockets.SocketExceptionA problem was experienced using the Socket or the Socket.ReceiveTimeout period has expired.
DecodingExceptionA problem was encountered decoding the Response.
Remarks

Returns when a matching response is received and decoded. Normally used on a worker thread. A matching StandardMessage.Id or Id is required in the response, and the source IPEndPoint must match that of the request. All received messages are reported to Log (matching and non-matching).

See Also

Reference

SnmpSocket Class
SnmpSocket Members
Overload List


PowerSNMP for .NET Documentation Version 8.0
© 2024 Dart Communications. All Rights Reserved.
Send comments on this topic