Ejemplo n.º 1
0
        private void Write(byte [] buffer, int offset, int count, bool chunked)
        {
            EnsureMetadata();

            var bytes = new List <ByteBuffer> ();

            if (chunked)
            {
                WriteChunk(bytes, count, false);
            }

            length += (count - offset);

            bytes.Add(new ByteBuffer(buffer, offset, count));
            if (chunked)
            {
                WriteChunk(bytes, -1, false);
            }

            var write_bytes = new SendBytesOperation(bytes.ToArray(), null);

            QueueWriteOperation(write_bytes);
        }
Ejemplo n.º 2
0
 public void Write(byte[] data, int offset, int count, WriteCallback callback)
 {
     var write_bytes = new SendBytesOperation(new[] {
         new ByteBuffer (data, offset, count)
     }, callback);
     QueueWriteOperation(write_bytes);
 }
Ejemplo n.º 3
0
        public void Write(byte[] data, int offset, int count, IO.WriteCallback callback)
        {
            var write_bytes = new SendBytesOperation(new ByteBuffer[] { new ByteBuffer(data, offset, count) }, callback);

            QueueWriteOperation(write_bytes);
        }