示例#1
0
                public SendPreambleAsyncResult(StreamedFramingRequestChannel channel, IConnection connection, ref TimeoutHelper timeoutHelper, ClientFramingDecoder decoder, AsyncCallback callback, object state) : base(callback, state)
                {
                    this.channel       = channel;
                    this.connection    = connection;
                    this.timeoutHelper = timeoutHelper;
                    this.decoder       = decoder;
                    IAsyncResult result = connection.BeginWrite(channel.Preamble, 0, channel.Preamble.Length, true, timeoutHelper.RemainingTime(), onWritePreamble, this);

                    if (result.CompletedSynchronously && this.HandleWritePreamble(result))
                    {
                        base.Complete(true);
                    }
                }
                public SendPreambleAsyncResult(StreamedFramingRequestChannel channel, IConnection connection,
                                               ref TimeoutHelper timeoutHelper, ClientFramingDecoder decoder, AsyncCallback callback, object state)
                    : base(callback, state)
                {
                    this.channel       = channel;
                    this.connection    = connection;
                    this.timeoutHelper = timeoutHelper;
                    this.decoder       = decoder;

                    AsyncCompletionResult writePreambleResult = connection.BeginWrite(channel.Preamble, 0, channel.Preamble.Length,
                                                                                      true, timeoutHelper.RemainingTime(), onWritePreamble, this);

                    if (writePreambleResult == AsyncCompletionResult.Queued)
                    {
                        return;
                    }

                    if (HandleWritePreamble())
                    {
                        base.Complete(true);
                    }
                }
 public StreamedFramingRequest(StreamedFramingRequestChannel channel)
 {
     this.channel = channel;
     this.connectionPoolHelper = new StreamedFramingRequestChannel.StreamedConnectionPoolHelper(channel);
 }
 public StreamedFramingAsyncRequest(StreamedFramingRequestChannel channel, AsyncCallback callback, object state) : base(callback, state)
 {
     this.channel = channel;
     this.connectionPoolHelper = new StreamedFramingRequestChannel.StreamedConnectionPoolHelper(channel);
 }
 public SendPreambleAsyncResult(StreamedFramingRequestChannel channel, IConnection connection, ref TimeoutHelper timeoutHelper, ClientFramingDecoder decoder, AsyncCallback callback, object state) : base(callback, state)
 {
     this.channel = channel;
     this.connection = connection;
     this.timeoutHelper = timeoutHelper;
     this.decoder = decoder;
     IAsyncResult result = connection.BeginWrite(channel.Preamble, 0, channel.Preamble.Length, true, timeoutHelper.RemainingTime(), onWritePreamble, this);
     if (result.CompletedSynchronously && this.HandleWritePreamble(result))
     {
         base.Complete(true);
     }
 }
 public StreamedConnectionPoolHelper(StreamedFramingRequestChannel channel) : base(channel.connectionPool, channel.connectionInitiator, channel.Via)
 {
     this.channel = channel;
 }
 public ClientSingletonConnectionReader(IConnection connection, StreamedFramingRequestChannel.StreamedConnectionPoolHelper connectionPoolHelper, IConnectionOrientedTransportFactorySettings settings) : base(connection, 0, 0, connectionPoolHelper.RemoteSecurity, settings, null)
 {
     this.connectionPoolHelper = connectionPoolHelper;
 }
                public SendPreambleAsyncResult(StreamedFramingRequestChannel channel, IConnection connection,
                    ref TimeoutHelper timeoutHelper, ClientFramingDecoder decoder, AsyncCallback callback, object state)
                    : base(callback, state)
                {
                    this.channel = channel;
                    this.connection = connection;
                    this.timeoutHelper = timeoutHelper;
                    this.decoder = decoder;

                    AsyncCompletionResult writePreambleResult = connection.BeginWrite(channel.Preamble, 0, channel.Preamble.Length,
                        true, timeoutHelper.RemainingTime(), onWritePreamble, this);

                    if (writePreambleResult == AsyncCompletionResult.Queued)
                    {
                        return;
                    }

                    if (HandleWritePreamble())
                    {
                        base.Complete(true);
                    }
                }
 public StreamedFramingAsyncRequest(StreamedFramingRequestChannel channel)
 {
     _channel = channel;
     _connectionPoolHelper = new StreamedConnectionPoolHelper(channel);
 }
示例#10
0
 public StreamedConnectionPoolHelper(StreamedFramingRequestChannel channel)
     : base(channel._connectionPool, channel._connectionInitiator, channel.Via)
 {
     _channel = channel;
 }
 public StreamedFramingAsyncRequest(StreamedFramingRequestChannel channel, AsyncCallback callback, object state)
     : base(callback, state)
 {
     this.channel = channel;
     this.connectionPoolHelper = new StreamedConnectionPoolHelper(channel);
 }
 public StreamedFramingRequest(StreamedFramingRequestChannel channel)
 {
     this.channel = channel;
     this.connectionPoolHelper = new StreamedConnectionPoolHelper(channel);
 }
 public StreamedFramingAsyncRequest(StreamedFramingRequestChannel channel)
 {
     _channel = channel;
     _connectionPoolHelper = new StreamedConnectionPoolHelper(channel);
 }