PowerSNMP for .NET
Receive Method (SnmpBase)




Used to receive an SNMP message on the current thread.
Syntax
Public Function Receive() As MessageBase
Dim instance As SnmpBase
Dim value As MessageBase
 
value = instance.Receive()
public MessageBase Receive()
public: MessageBase* Receive(); 
public:
MessageBase^ Receive(); 

Return Value

Exceptions
ExceptionDescription
System.Net.Sockets.SocketExceptionThrown by System.Net.Sockets.Socket.
Remarks

Open must be used to create System.Net.Sockets.Socket before using Receive. The thread sleeps while waiting for the next packet. This technique is used in scripting and console applications where the main thread must be blocked until terminated. Close can be used (on another thread) to release a pending Receive (a SocketException is thrown).

Agent can open port 161 and use this method to receive SetMessage, GetMessage, GetNextMessage and GetBulkMessage PDUs.

Manager can open port 162 and use this method to receive Trap1Message, Trap2Message and InformMessage PDUs.

See Also

Reference

SnmpBase Class
SnmpBase Members


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