Example #1
0
        void CreateStartChunk()
        {
            ChunkBodyWriter startBodyWriter = new ChunkBodyWriter(this.WriteStartChunkCallback, startState);

            startMessage = Message.CreateMessage(
                this.version,
                ChunkingUtils.ChunkAction,
                startBodyWriter);
            SetStartMessageHeaders(this.originalMessage, startMessage);
            this.outputChannel.Send(startMessage, chunkingTimeout.RemainingTime());
        }
Example #2
0
        void CreateStartChunk()
        {
            ChunkBodyWriter startBodyWriter = new ChunkBodyWriter(this.WriteStartChunkCallback,startState);
            startMessage = Message.CreateMessage(
                            this.version,
                            ChunkingUtils.ChunkAction,
                            startBodyWriter);
            SetStartMessageHeaders(this.originalMessage, startMessage);
            this.outputChannel.Send(startMessage, chunkingTimeout.RemainingTime());

        }
Example #3
0
        void CreateChunkMessage()
        {
            ChunkBodyWriter bodyWriter = new ChunkBodyWriter(this.WriteChunkCallback, this.chunkState);
            Message         chunk      = Message.CreateMessage(this.version, ChunkingUtils.ChunkAction, bodyWriter);

            chunk.Headers.Add(this.messageIdHeader);
            chunk.Headers.Add(MessageHeader.CreateHeader(ChunkingUtils.ChunkNumberHeader, ChunkingUtils.ChunkNs, this.chunkNum, true));
            this.outputChannel.Send(chunk, chunkingTimeout.RemainingTime());
            Console.WriteLine(" > Sent chunk {0} of message {1}", chunkNum, this.messageId);
            this.chunkNum++;
            this.chunkState = new ChunkState();
        }
Example #4
0
        void CreateEndChunk()
        {
            ChunkBodyWriter endBodyWriter = new ChunkBodyWriter(
                this.WriteStartChunkCallback,
                startState);

            Message endMessage = Message.CreateMessage(this.version, ChunkingUtils.ChunkAction, endBodyWriter);

            endMessage.Headers.Add(this.messageIdHeader);
            endMessage.Headers.Add(MessageHeader.CreateHeader(ChunkingUtils.ChunkingEndHeader, ChunkingUtils.ChunkNs, null, true));
            endMessage.Headers.Add(MessageHeader.CreateHeader(ChunkingUtils.ChunkNumberHeader, ChunkingUtils.ChunkNs, this.chunkNum, true));
            this.outputChannel.Send(endMessage, chunkingTimeout.RemainingTime());
            Console.WriteLine(" > Sent chunk {0} of message {1}", chunkNum, this.messageId);
        }
Example #5
0
        void CreateEndChunk()
        {
            ChunkBodyWriter endBodyWriter = new ChunkBodyWriter(
                                this.WriteStartChunkCallback,
                                startState);

            Message endMessage = Message.CreateMessage(this.version, ChunkingUtils.ChunkAction, endBodyWriter);
            endMessage.Headers.Add(this.messageIdHeader);
            endMessage.Headers.Add(MessageHeader.CreateHeader(ChunkingUtils.ChunkingEndHeader, ChunkingUtils.ChunkNs, null, true));
            endMessage.Headers.Add(MessageHeader.CreateHeader(ChunkingUtils.ChunkNumberHeader, ChunkingUtils.ChunkNs, this.chunkNum, true));
            this.outputChannel.Send(endMessage, chunkingTimeout.RemainingTime());
            Console.WriteLine(" > Sent chunk {0} of message {1}", chunkNum, this.messageId);
            
        }
Example #6
0
        void CreateChunkMessage()
        {
            ChunkBodyWriter bodyWriter = new ChunkBodyWriter(this.WriteChunkCallback, this.chunkState);
            Message chunk = Message.CreateMessage(this.version, ChunkingUtils.ChunkAction, bodyWriter);
            chunk.Headers.Add(this.messageIdHeader);
            chunk.Headers.Add(MessageHeader.CreateHeader(ChunkingUtils.ChunkNumberHeader, ChunkingUtils.ChunkNs, this.chunkNum, true));
            this.outputChannel.Send(chunk, chunkingTimeout.RemainingTime());
            Console.WriteLine(" > Sent chunk {0} of message {1}", chunkNum, this.messageId);
            this.chunkNum++;
            this.chunkState = new ChunkState();

        }