public RpcBodyBuffer(Stream stream, int len) { _value = null; _mode = RpcBodyBufferMode.Input; _buffer = new byte[len]; int a = 0; int r = 0; while (a < len) { r = stream.Read(_buffer, a, len - a); if (r <= 0) { throw new Exception("input stream not enought"); } a += r; } }
protected RpcBodyBuffer(RpcBodyBufferMode mode, object value) { _value = value; _mode = mode; }
public RpcBodyBuffer(byte[] buffer) { _value = null; _mode = RpcBodyBufferMode.Input; _buffer = buffer; }