Dart.Snmp Namespace > SnmpSocket Class > SnmpSocket Constructor : SnmpSocket Constructor(SnmpBase,IPEndPoint,Boolean) |
Public Function New( _ ByVal entity As SnmpBase, _ ByVal localEP As IPEndPoint, _ ByVal dualMode As Boolean _ )
Dim entity As SnmpBase Dim localEP As IPEndPoint Dim dualMode As Boolean Dim instance As New SnmpSocket(entity, localEP, dualMode)
localEP.AddressFamily must match the AddressFamily of the target SNMP entity unless dualMode is true and localEP.Address is IPAddress.IPv6Any or an IPv4-mapped IPv6 address. 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.
When created by the user, Close() should be used to release resources.