Ejemplo n.º 1
0
            public Message WaitForReply(TimeSpan timeout)
            {
                StreamedFramingRequestChannel.ClientSingletonConnectionReader reader = new StreamedFramingRequestChannel.ClientSingletonConnectionReader(this.connection, this.connectionPoolHelper, this.channel.settings);
                reader.DoneSending(TimeSpan.Zero);
                Message message = reader.Receive(timeout);

                if (message != null)
                {
                    ChannelBindingUtility.TryAddToMessage(this.channel.channelBindingToken, message, false);
                }
                return(message);
            }
Ejemplo n.º 2
0
            private bool HandleWriteMessage(IAsyncResult result)
            {
                StreamingConnectionHelper.EndWriteMessage(result);
                this.connectionReader = new StreamedFramingRequestChannel.ClientSingletonConnectionReader(this.connection, this.connectionPoolHelper, this.channel.settings);
                this.connectionReader.DoneSending(TimeSpan.Zero);
                IAsyncResult result2 = this.connectionReader.BeginReceive(this.timeoutHelper.RemainingTime(), onReceiveReply, this);

                if (!result2.CompletedSynchronously)
                {
                    return(false);
                }
                return(this.CompleteReceiveReply(result2));
            }
 public Message WaitForReply(TimeSpan timeout)
 {
     StreamedFramingRequestChannel.ClientSingletonConnectionReader reader = new StreamedFramingRequestChannel.ClientSingletonConnectionReader(this.connection, this.connectionPoolHelper, this.channel.settings);
     reader.DoneSending(TimeSpan.Zero);
     Message message = reader.Receive(timeout);
     if (message != null)
     {
         ChannelBindingUtility.TryAddToMessage(this.channel.channelBindingToken, message, false);
     }
     return message;
 }
 private bool HandleWriteMessage(IAsyncResult result)
 {
     StreamingConnectionHelper.EndWriteMessage(result);
     this.connectionReader = new StreamedFramingRequestChannel.ClientSingletonConnectionReader(this.connection, this.connectionPoolHelper, this.channel.settings);
     this.connectionReader.DoneSending(TimeSpan.Zero);
     IAsyncResult result2 = this.connectionReader.BeginReceive(this.timeoutHelper.RemainingTime(), onReceiveReply, this);
     if (!result2.CompletedSynchronously)
     {
         return false;
     }
     return this.CompleteReceiveReply(result2);
 }