public DuplexChannelBase(ChannelFactoryBase factory, EndpointAddress remoteAddress, Uri via) : base(factory)
 {
     channel_factory_base = factory;
     remote_address       = remoteAddress;
     this.via             = via;
     SetupDelegates();
 }
 public OutputChannelBase(ChannelFactoryBase factory, EndpointAddress remoteAddress, Uri via)
     : base(factory)
 {
     this.channel_factory = factory;
     RemoteAddress        = remoteAddress;
     Via = via;
 }
Пример #3
0
 public RequestChannelBase(ChannelFactoryBase factory, EndpointAddress address, Uri via)
     : base(factory)
 {
     this.channel_factory = factory;
     this.address         = address;
     this.via             = via;
 }
Пример #4
0
        public TcpDuplexSessionChannel(ChannelFactoryBase factory, TcpChannelInfo info, EndpointAddress address, Uri via)
            : base(factory, address, via)
        {
            is_service_side = false;
            this.info       = info;

            // make sure to acquire TcpClient here.
            int explicitPort = Via.Port;

            client = new TcpClient(Via.Host, explicitPort <= 0 ? TcpTransportBindingElement.DefaultPort : explicitPort);
            counterpart_address = GetEndpointAddressFromTcpClient(client);
        }
        public void Prepare(ChannelFactoryBase factory, EndpointAddress address)
        {
            this.factory    = factory;
            this.message_to = address;

            PrepareAuthenticator();

            // This check is almost extra, though it is needed
            // to check correct signing token existence.
            if (EncryptionToken == null)
            {
                throw new Exception("INTERNAL ERROR");
            }
        }
        protected override void ReleaseCore()
        {
            this.factory    = null;
            this.message_to = null;

            IDisposable disposable = signing_token as IDisposable;

            if (disposable != null)
            {
                disposable.Dispose();
            }
            signing_token = null;

            disposable = encryption_token as IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
            encryption_token = null;
        }
Пример #7
0
 public NamedPipeRequestChannel(ChannelFactoryBase factory, MessageEncoder encoder, EndpointAddress address, Uri via)
     : base(factory, address, via)
 {
     this.Encoder = encoder;
 }
Пример #8
0
 public TcpRequestChannel(ChannelFactoryBase factory, TcpChannelInfo info, EndpointAddress address, Uri via)
     : base(factory, address, via)
 {
     this.info = info;
 }