public TcpDuplexSessionChannel(ChannelListenerBase listener, TcpChannelInfo info, TcpClient client) : base(listener) { is_service_side = true; this.client = client; this.info = info; counterpart_address = GetEndpointAddressFromTcpClient(client); }
public PeerDuplexChannel(IPeerChannelManager listener) : base((ChannelListenerBase)listener) { binding = listener.Source; this.resolver = listener.Resolver; info = new TcpChannelInfo(binding, listener.MessageEncoder, null); // FIXME: fill properties correctly. node = new PeerNodeImpl(((ChannelListenerBase)listener).Uri.Host, listener.Source.ListenIPAddress, listener.Source.Port); }
public PeerDuplexChannel(IPeerChannelManager factory, EndpointAddress address, Uri via, PeerResolver resolver) : base((ChannelFactoryBase)factory, address, via) { binding = factory.Source; this.resolver = factory.Resolver; info = new TcpChannelInfo(binding, factory.MessageEncoder, null); // FIXME: fill properties correctly. // It could be opened even with empty list of PeerNodeAddresses. // So, do not create PeerNode per PeerNodeAddress, but do it with PeerNodeAddress[]. node = new PeerNodeImpl(RemoteAddress.Uri.Host, factory.Source.ListenIPAddress, factory.Source.Port); }
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 TcpChannelFactory(TcpTransportBindingElement source, BindingContext ctx) { MessageEncoder encoder = null; XmlDictionaryReaderQuotas quotas = null; foreach (BindingElement be in ctx.RemainingBindingElements) { MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement; if (mbe != null) { encoder = CreateEncoder <TChannel> (mbe); quotas = mbe.GetProperty <XmlDictionaryReaderQuotas> (ctx); break; } } if (encoder == null) { encoder = new BinaryMessageEncoder(); } info = new TcpChannelInfo(source, encoder, quotas); }
public TcpChannelListener(TcpTransportBindingElement source, BindingContext context) : base(context) { XmlDictionaryReaderQuotas quotas = null; foreach (BindingElement be in context.Binding.Elements) { MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement; if (mbe != null) { MessageEncoder = CreateEncoder <TChannel> (mbe); quotas = mbe.GetProperty <XmlDictionaryReaderQuotas> (context); break; } } if (MessageEncoder == null) { MessageEncoder = new BinaryMessageEncoder(); } info = new TcpChannelInfo(source, MessageEncoder, quotas); }
public TcpReplyChannel(ChannelListenerBase listener, TcpChannelInfo info, TcpClient client) : base(listener) { this.client = client; this.info = info; }
public TcpRequestChannel(ChannelFactoryBase factory, TcpChannelInfo info, EndpointAddress address, Uri via) : base(factory, address, via) { this.info = info; }