Dart.Snmp Namespace > SnmpBase Class : Receive Method |
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();
Exception | Description |
---|---|
System.Net.Sockets.SocketException | Thrown by System.Net.Sockets.Socket. |
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.