/// <summary> /// Creates an instance of the UDP binding element /// </summary> /// <param name="cfg">The configuration associated with this binding element.</param> public UdpTransportBindingElement(UdpTransportBindingConfig cfg) { m_config = cfg; if(s_localIP == null) { s_localIP = IPAddress.Parse(WsNetworkServices.GetLocalIPV4Address()); } }
/// <summary> /// Creates an instance of the UDP binding element /// </summary> /// <param name="cfg">The configuration associated with this binding element.</param> public UdpTransportBindingElement(UdpTransportBindingConfig cfg) { m_config = cfg; if (s_localIP == null) { s_localIP = IPAddress.Parse(WsNetworkServices.GetLocalIPV4Address()); } }
//public override string Transport //{ // get { return "udp://" + m_endpointAddress.Host + ":" + m_endpointAddress.Port + "/"; } //} /// <summary> /// Sets the configuration for the UDP transport binding /// </summary> /// <param name="cfg">The configuration for this binding.</param> protected override void OnSetBindingConfiguration(object cfg) { if (cfg is HttpTransportBindingConfig) { m_config = (UdpTransportBindingConfig)cfg; } if (m_config == null) throw new Exception(); // no binding configuration }
/// <summary> /// Sets the configuration for the UDP transport binding /// </summary> /// <param name="cfg">The configuration for this binding.</param> protected override void OnSetBindingConfiguration(object cfg) { if (cfg is UdpTransportBindingConfig) { m_config = (UdpTransportBindingConfig)cfg; } if (m_config == null) { throw new Exception(); // no binding configuration } }
/// <summary> /// Creates an instance of the UDP binding element /// </summary> /// <param name="cfg">The configuration associated with this binding element.</param> public UdpTransportBindingElement(UdpTransportBindingConfig cfg) { m_config = cfg; }