Dart.Snmp Namespace > Agent Class > Start Method : Start(RequestReceived,IPEndPoint,Boolean,Boolean,Object) Method |
Public Overloads Sub Start( _ ByVal callback As RequestReceived, _ ByVal localEP As IPEndPoint, _ ByVal acceptBroadcast As Boolean, _ ByVal dualMode As Boolean, _ ByVal state As Object _ )
Dim instance As Agent Dim callback As RequestReceived Dim localEP As IPEndPoint Dim acceptBroadcast As Boolean Dim dualMode As Boolean Dim state As Object instance.Start(callback, localEP, acceptBroadcast, dualMode, state)
public void Start( RequestReceived callback, IPEndPoint localEP, bool acceptBroadcast, bool dualMode, object state )
public: void Start( RequestReceived* callback, IPEndPoint* localEP, bool acceptBroadcast, bool dualMode, Object* state )
public: void Start( RequestReceived^ callback, IPEndPoint^ localEP, bool acceptBroadcast, bool dualMode, Object^ state )
Use this method to receive SNMP requests from SNMP managers. It is possible for the RequestReceived delegate to be raised concurrently on multiple IO Completion threads, so its code should be thread-safe.
If dual mode (simultaneous IPv4 and IPv6) socket operation is desired, use IPAddress.IPv6Any (for all IPv4 and IPv6 interfaces) or an IPv4-mapped IPv6 address for the localEP address, and true for the dualMode argument. An IPv4-mapped IPv6 address is the IPv4 address of a network interface preceded by "::ffff:". Ex: ::ffff:192.168.1.1. If an IPv4-mapped IPv6 address is used then acceptBroadcast must be false. To accept broadcast packets in dual mode, IPAddress.IPv6Any must be used.
This method always creates a new SocketBase.Socket. Use multiple Agent instances to accept SNMP requests on multiple sockets.
Unhandled exceptions thrown on the IO Completion thread are caught and reported by the Error event.
Scripting applications should use Receive instead.