public UdpClient(int localPort) { rxBuffer = new Queue <UDPPacket>(8); this.localPort = localPort; if (localPort > 0) { clients.Add((uint)localPort, this); } }
internal static void Update(IPv4.Address ipAddress, MACAddress macAddress) { ensureCacheExists(); UInt32 ip_hash = ipAddress.Hash; if (ip_hash == 0) { return; } if (cache.ContainsKey(ip_hash) == false) { cache.Add(ip_hash, macAddress); } else { cache[ip_hash] = macAddress; } }
/// <summary> /// Update ARP cache. /// </summary> /// <param name="ipAddress">IP address.</param> /// <param name="macAddress">MAC address.</param> /// <exception cref="ArgumentOutOfRangeException">Thrown on fatal error (contact support).</exception> /// <exception cref="sysIO.IOException">Thrown on IO error.</exception> /// <exception cref="ArgumentException">Thrown on fatal error (contact support).</exception> internal static void Update(IPv4.Address ipAddress, MACAddress macAddress) { ensureCacheExists(); if (ipAddress == null) { global::System.Console.Write(""); } UInt32 ip_hash = ipAddress.Hash; if (ip_hash == 0) { return; } if (cache.ContainsKey(ip_hash) == false) { cache.Add(ip_hash, macAddress); } else { cache[ip_hash] = macAddress; } }