public BandwidthNotifyingStream(Stream s) : base(s) {
this.blockingDetectionTimer = new Timer(2000);
this.blockingDetectionTimer.Elapsed += delegate(object sender, ElapsedEventArgs args) {
this.BitsPerSecond = (long)((this.bytesTransmittedSinceLastSecond * 8) / this.blockingDetectionTimer.Interval);
this.bytesTransmittedSinceLastSecond = 0;
};
this.blockingDetectionTimer.Start();
}