view Util/PipeStream.cs @ 36:c4a5dbe62513

USBLib: small fix in WinUSB backend bounds checking
author Ivo Smits <Ivo@UCIS.nl>
date Sun, 21 Apr 2013 18:32:43 +0200
parents 28dc7d535036
children
line wrap: on
line source

???using System;

namespace UCIS.Util {
	public class PipeStream : QueuedPacketStream {
		public override bool CanWrite { get { return !Closed; } }
		public override void Flush() { }
		public override void Write(byte[] buffer, int offset, int count) {
			if (Closed) throw new ObjectDisposedException("PipeStream");
			AddReadBufferCopy(buffer, offset, count);
		}
	}
}