internal override void OnOpen(TimeSpan timeout) { TimeoutHelper timeoutHelper = new TimeoutHelper(timeout); IConnectionListener connectionListener = this.connectionElement.CreateListener(base.ConnectionBufferSize, this.listenUri); this.connectionListener = new BufferedConnectionListener(connectionListener, base.MaxOutputDelay, base.ConnectionBufferSize); this.connectionDemuxer = new ConnectionDemuxer(this.connectionListener, base.MaxPendingAccepts, base.MaxPendingConnections, base.ChannelInitializationTimeout, base.IdleTimeout, base.MaxPooledConnections, new TransportSettingsCallback(this.OnGetTransportFactorySettings), new SingletonPreambleDemuxCallback(this.OnGetSingletonMessageHandler), new ServerSessionPreambleDemuxCallback(this.OnHandleServerSessionPreamble), new ErrorCallback(this.OnDemuxerError)); bool flag = false; try { this.connectionDemuxer.Open(timeoutHelper.RemainingTime()); flag = true; } finally { if (!flag) { if (this.registration != null) { this.registration.Dispose(); this.registration = null; } this.connectionDemuxer.Abort(); } } }
private void CreateConnectionDemuxer() { IConnectionListener listener = new BufferedConnectionListener(this.listener, base.MaxOutputDelay, base.ConnectionBufferSize); if (DiagnosticUtility.ShouldUseActivity) { listener = new TracingConnectionListener(listener, base.ListenUri); } this.connectionDemuxer = new ConnectionDemuxer(listener, base.MaxPendingAccepts, base.MaxPendingConnections, base.ChannelInitializationTimeout, base.IdleTimeout, base.MaxPooledConnections, new TransportSettingsCallback(this.OnGetTransportFactorySettings), new SingletonPreambleDemuxCallback(this.OnGetSingletonMessageHandler), new ServerSessionPreambleDemuxCallback(this.OnHandleServerSessionPreamble), new System.ServiceModel.Channels.ErrorCallback(this.OnDemuxerError)); this.connectionDemuxer.StartDemuxing(this.onViaCallback); }
void CreateConnectionDemuxer() { IConnectionListener connectionListener = new BufferedConnectionListener(listener, MaxOutputDelay, ConnectionBufferSize); if (DiagnosticUtility.ShouldUseActivity) { connectionListener = new TracingConnectionListener(connectionListener, this.ListenUri); } connectionDemuxer = new ConnectionDemuxer(connectionListener, MaxPendingAccepts, MaxPendingConnections, ChannelInitializationTimeout, IdleTimeout, MaxPooledConnections, OnGetTransportFactorySettings, OnGetSingletonMessageHandler, OnHandleServerSessionPreamble, OnDemuxerError); connectionDemuxer.StartDemuxing(onViaCallback); }