protected virtual void OnDataException(UdpServerEventArgs arg) { NetStat.Set("Errors", 1, arg.Data?.Length ?? 0); DataException?.Invoke(this, arg); Helper.OnException(arg.Exception); }
protected internal void OnDataException(TcpExceptionEventArgs arg) { DataException?.Invoke(this, arg); Helper.OnException(arg.Exception); if (arg.Arguments is TcpServerEventArgs tcpArgs && tcpArgs.Stream is MemoryStream) { tcpArgs.Stream.Dispose(); } }
protected virtual void OnDataException(ExceptionEventArgs ex) { DataException?.Invoke(this, ex); Helper.OnException(ex.Exception); }