PowerSNMP for .NET
Send(RequestMessage,IPEndPoint) Method




A GetMessage, GetNextMessage, GetBulkMessage, InformMessage or SetMessage.
The IPEndPoint specifying the target agent or manager.
Encodes and sends a RequestMessage to the specified agent.
Syntax
Public Overloads Sub Send( _
   ByVal request As RequestMessage, _
   ByVal remoteEP As IPEndPoint _
) 
Dim instance As SnmpSocket
Dim request As RequestMessage
Dim remoteEP As IPEndPoint
 
instance.Send(request, remoteEP)
public void Send( 
   RequestMessage request,
   IPEndPoint remoteEP
)

Parameters

request
A GetMessage, GetNextMessage, GetBulkMessage, InformMessage or SetMessage.
remoteEP
The IPEndPoint specifying the target agent or manager.
Exceptions
ExceptionDescription
System.Net.Sockets.SocketExceptionA problem was experienced using the Socket.
Remarks

Receive(RequestMessage,IPEndPoint) should be used to receive and decode the expected ResponseMessage.

It is necessary for the address family of the source and destination ports to match. For supporting both, use Start(ThreadStart,IPEndPoint,Object) to start 2 worker threads (one using AddressFamily.InterNetwork and one using AddressFamily.InternetNetworkV6).

If using SNMPv3 the discovery of the recipient's engine id is automatic and cached in SessionSecurity.EngineCache. Encrypted passwords are also cached to improve performance.

See Also

Reference

SnmpSocket Class
SnmpSocket Members
Overload List

6.1.1.2
PowerSNMP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic