Exemplo n.º 1
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));
            }
            bool HandleWriteMessage(IAsyncResult result)
            {
                // write out the streamed message
                StreamingConnectionHelper.EndWriteMessage(result);

                connectionReader = new ClientSingletonConnectionReader(connection, connectionPoolHelper, channel.settings);
                connectionReader.DoneSending(TimeSpan.Zero); // we still need to receive

                IAsyncResult receiveResult = connectionReader.BeginReceive(timeoutHelper.RemainingTime(), onReceiveReply, this);

                if (!receiveResult.CompletedSynchronously)
                {
                    return(false);
                }

                return(CompleteReceiveReply(receiveResult));
            }
Exemplo n.º 3
0
 protected override void OnEndReply(IAsyncResult result)
 {
     StreamingConnectionHelper.EndWriteMessage(result);
     this.parent.DoneSending(this.timeoutHelper.RemainingTime());
 }