Example #1
0
 /// <summary>
 /// Creates a http service host.
 /// </summary>
 /// <param name="port">An integer containing the port number this host will listen on.</param>
 /// <param name="serviceEndpoints">A collection of service endpoints this transport service can dispatch to.</param>
 public WsHttpServiceHost(_Bind.Binding binding, WsServiceEndpoints serviceEndpoints)
 {
     m_threadManager    = new WsThreadManager(5, "Http");
     m_binding          = binding;
     m_serviceEndpoints = serviceEndpoints;
     m_isStarted        = false;
 }
Example #2
0
        // private
        private WsUdpServiceHost()
        {
            m_threadManager    = new WsThreadManager(5, "Udp");
            m_serviceEndpoints = new WsServiceEndpoints();
            m_refcount         = 0;
            m_binding          = null;
            m_replyChannel     = null;

            UdpTransportBindingElement transport = new UdpTransportBindingElement(new UdpTransportBindingConfig(WsDiscovery.WsDiscoveryAddress, WsDiscovery.WsDiscoveryPort, m_ignoreLocalRequests));

            m_binding = new CustomBinding(transport);
        }