internal void Dispose() { if (IsDisposed) return; IsDisposed = true; OnRxBeginn = null; OnRxCompleted = null; _rxTimeout.Stop(); _rxTimeout.Dispose(); _cRx = null; _rxTempBytes.Clear(); _rxTempBytes = null; _base = null; }
private void EndRx(PacketSuffix ps) { if (_cRx == null) return; Base.Statistic.RxPacketCount++; _rxTimeout.Stop(); _cRx.SetSucceeded(ps); if (OnRxCompleted != null) OnRxCompleted(_cRx); _cRx = null; }
private void RxTimeoutElapsed(object sender, ElapsedEventArgs e) { if (_cRx == null) return; _cRx.SetTimedOut(); if (OnRxCompleted != null) OnRxCompleted(_cRx); _cRx = null; }
private void BeginRx(PacketPrefix prefix) { if (_cRx != null) { _cRx.SetInterrupted(); if (OnRxCompleted != null) OnRxCompleted(_cRx); _cRx = null; } _rxTimeout.Interval = Base.Options.InterpreterOptions.PacketSegmentReciveTimeOut.TotalMilliseconds; _cRx = new Packet.Rx(Base); _cRx.SetReciving(prefix); if (OnRxBeginn != null) OnRxBeginn(_cRx); }