public ServerReliableSession(
     ChannelBase channel,
     IReliableFactorySettings listener,
     IServerReliableChannelBinder binder,
     FaultHelper faultHelper,
     UniqueId inputID,
     UniqueId outputID)
     : base(channel, listener, binder, faultHelper)
 {
     this.InputID  = inputID;
     this.OutputID = outputID;
 }
Example #2
0
 protected override void ProcessSequencedItem(IDuplexSessionChannel channel, Message message, ServerReliableDuplexSessionChannel reliableChannel, WsrmMessageInfo info, bool newChannel)
 {
     if (!newChannel)
     {
         IServerReliableChannelBinder binder = (IServerReliableChannelBinder)reliableChannel.Binder;
         if (!binder.UseNewChannel(channel))
         {
             message.Close();
             channel.Abort();
             return;
         }
     }
     reliableChannel.ProcessDemuxedMessage(info);
 }
 public ReliableInputSessionChannelOverReply(ReliableChannelListenerBase<IInputSessionChannel> listener, IServerReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID) : base(listener, binder, faultHelper, inputID)
 {
     if (binder.HasSession)
     {
         try
         {
             base.StartReceiving(false);
         }
         catch (Exception exception)
         {
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             base.ReliableSession.OnUnknownException(exception);
         }
     }
 }
 public ReliableInputSessionChannelOverDuplex(ReliableChannelListenerBase<IInputSessionChannel> listener, IServerReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID) : base(listener, binder, faultHelper, inputID)
 {
     this.guard = new Guard(0x7fffffff);
     this.acknowledgementInterval = listener.AcknowledgementInterval;
     this.acknowledgementTimer = new IOThreadTimer(new Action<object>(this.OnAcknowledgementTimeoutElapsed), null, true);
     base.DeliveryStrategy.DequeueCallback = new Action(this.OnDeliveryStrategyItemDequeued);
     if (binder.HasSession)
     {
         try
         {
             base.StartReceiving(false);
         }
         catch (Exception exception)
         {
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             base.ReliableSession.OnUnknownException(exception);
         }
     }
 }
 protected ReliableInputSessionChannel(ReliableChannelListenerBase <IInputSessionChannel> listener, IServerReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID) : base(listener, binder.LocalAddress)
 {
     this.binder     = binder;
     this.listener   = listener;
     this.connection = new ReliableInputConnection();
     this.connection.ReliableMessagingVersion = listener.ReliableMessagingVersion;
     this.session = new ServerReliableSession(this, listener, binder, faultHelper, inputID, null);
     this.session.UnblockChannelCloseCallback = new ChannelReliableSession.UnblockChannelCloseHandler(this.UnblockClose);
     if (listener.Ordered)
     {
         this.deliveryStrategy = new OrderedDeliveryStrategy <Message>(this, listener.MaxTransferWindowSize, false);
     }
     else
     {
         this.deliveryStrategy = new UnorderedDeliveryStrategy <Message>(this, listener.MaxTransferWindowSize);
     }
     this.binder.Faulted     += new BinderExceptionHandler(this.OnBinderFaulted);
     this.binder.OnException += new BinderExceptionHandler(this.OnBinderException);
     this.session.Open(TimeSpan.Zero);
     if (PerformanceCounters.PerformanceCountersEnabled)
     {
         this.perfCounterId = this.listener.Uri.ToString().ToUpperInvariant();
     }
 }
 protected override ReliableInputSessionChannelOverReply CreateChannel(UniqueId id, CreateSequenceInfo createSequenceInfo, IServerReliableChannelBinder binder)
 {
     binder.Open(base.InternalOpenTimeout);
     return(new ReliableInputSessionChannelOverReply(this, binder, base.FaultHelper, id));
 }
 public ServerReliableSession(
     ChannelBase channel,
     IReliableFactorySettings listener,
     IServerReliableChannelBinder binder,
     FaultHelper faultHelper,
     UniqueId inputID,
     UniqueId outputID)
     : base(channel, listener, binder, faultHelper)
 {
     this.InputID = inputID;
     this.OutputID = outputID;
 }
 public ReliableInputSessionChannelOverReply(ReliableChannelListenerBase <IInputSessionChannel> listener, IServerReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID) : base(listener, binder, faultHelper, inputID)
 {
     if (binder.HasSession)
     {
         try
         {
             base.StartReceiving(false);
         }
         catch (Exception exception)
         {
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             base.ReliableSession.OnUnknownException(exception);
         }
     }
 }
Example #9
0
 protected abstract TReliableChannel CreateChannel(UniqueId id, CreateSequenceInfo createSequenceInfo, IServerReliableChannelBinder binder);
Example #10
0
 protected override ServerReliableDuplexSessionChannel CreateChannel(UniqueId id, CreateSequenceInfo createSequenceInfo, IServerReliableChannelBinder binder)
 {
     binder.Open(base.InternalOpenTimeout);
     return(new ServerReliableDuplexSessionChannel(this, binder, base.FaultHelper, id, createSequenceInfo.OfferIdentifier));
 }
Example #11
0
 public ReliableInputSessionChannelOverDuplex(ReliableChannelListenerBase <IInputSessionChannel> listener, IServerReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID) : base(listener, binder, faultHelper, inputID)
 {
     this.guard = new Guard(0x7fffffff);
     this.acknowledgementInterval          = listener.AcknowledgementInterval;
     this.acknowledgementTimer             = new IOThreadTimer(new Action <object>(this.OnAcknowledgementTimeoutElapsed), null, true);
     base.DeliveryStrategy.DequeueCallback = new Action(this.OnDeliveryStrategyItemDequeued);
     if (binder.HasSession)
     {
         try
         {
             base.StartReceiving(false);
         }
         catch (Exception exception)
         {
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             base.ReliableSession.OnUnknownException(exception);
         }
     }
 }