Пример #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());
        }
Пример #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());

        }
Пример #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();
        }
Пример #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);
        }
Пример #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);
            
        }
Пример #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();

        }