/// <summary> /// filter the disconnected event from specified client. /// </summary> /// <param name="obj"> /// a UdpReceivedBytes object that contains the event to filt. /// </param> /// <returns> /// if the received data is from the specified local endpoint, return true; otherwise, false. /// </returns> public bool FilterUdpPacketOrBytes(IPEndPointStackPacket obj) { if (obj == null) { return false; } return this.CompareUdpPacketOrBytes(obj.LocalEndPoint); }
/// <summary> /// filter the disconnected event from specified client. /// </summary> /// <param name="obj"> /// a UdpReceivedBytes object that contains the event to filt. /// </param> /// <returns> /// if the received data is from the specified local endpoint, return true; otherwise, false. /// </returns> public bool FilterIPEndPoint(IPEndPointStackPacket obj) { if (obj == null) { return false; } // compare the endpoint. if (obj.RemoteEndPoint == null || !obj.RemoteEndPoint.Equals(this.endpoint)) { return false; } return true; }