示例#1
0
        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;
            }
        }
示例#2
0
 protected RpcBodyBuffer(RpcBodyBufferMode mode, object value)
 {
     _value = value;
     _mode  = mode;
 }
示例#3
0
 public RpcBodyBuffer(byte[] buffer)
 {
     _value  = null;
     _mode   = RpcBodyBufferMode.Input;
     _buffer = buffer;
 }