// channel factory public UdpDuplexChannel (UdpChannelFactory factory, BindingContext ctx, EndpointAddress address, Uri via) : base (factory) { binding_element = factory.Source; RemoteAddress = address; Via = via; }
// channel factory public UdpDuplexChannel (UdpChannelFactory factory, BindingContext context, EndpointAddress address, Uri via) : base (factory) { if (factory == null) throw new ArgumentNullException ("factory"); if (context == null) throw new ArgumentNullException ("context"); if (address == null) throw new ArgumentNullException ("address"); binding_element = factory.Source; RemoteAddress = address; Via = via; FillMessageEncoder (context); }
public UdpOutputChannel(UdpChannelFactory factory, EndpointAddress remoteAddress, Uri via, BufferManager bufferManager, MessageEncoder messageEncoder) : base(factory) { if (!string.Equals(via.Scheme, ExStringConstants.Scheme)) { throw new ArgumentException(via.Scheme, "via"); } this._BuffManager = bufferManager; this._MessageEncoder = messageEncoder; this._Factory = factory; this._RemoteAddress = remoteAddress; this._Via = via; IPAddress remoteIP = IPAddress.Parse(via.Host); this._RemoteEndPoint = new IPEndPoint(remoteIP, via.Port); this._Socket = new Socket(this._RemoteEndPoint.AddressFamily, SocketType.Dgram, ProtocolType.Udp); }