Exemple #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;
 }
Exemple #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);
        }
 /// <summary>
 /// Create an instance of a message procesor class.
 /// </summary>
 /// <param name="threadManager">
 /// A refernce to the WsThreadManager class that created this class. This parameter is stored
 /// locally an used to decrement the thread managers current thread count.
 /// </param>
 /// <param name="processor">A instance of an object used to process a request. This instance
 /// is the ThreadStart instance.
 /// </param>
 /// <param name="transportName">String used to display the type of thread being created.</param>
 /// <param name="soapMessage">A byte array containing the soap message to process.</param>
 /// <param name="remoteEP">A IPEndPoint that identifies who sent the request.</param>
 /// <param name="messageCheck">
 /// A optional WsMessageCheck instance. If not null the downstream
 /// processor will ignor this message if it has been previously received.
 /// </param>
 public MessageProcessor(WsThreadManager threadManager, IWsTransportMessageProcessor processor)
 {
     m_threadManager = threadManager;
     m_processor = processor;
 }
 /// <summary>
 /// Create an instance of a message procesor class.
 /// </summary>
 /// <param name="threadManager">
 /// A refernce to the WsThreadManager class that created this class. This parameter is stored
 /// locally an used to decrement the thread managers current thread count.
 /// </param>
 /// <param name="processor">A instance of an object used to process a request. This instance
 /// is the ThreadStart instance.
 /// </param>
 /// <param name="transportName">String used to display the type of thread being created.</param>
 /// <param name="soapMessage">A byte array containing the soap message to process.</param>
 /// <param name="remoteEP">A IPEndPoint that identifies who sent the request.</param>
 /// <param name="messageCheck">
 /// A optional WsMessageCheck instance. If not null the downstream
 /// processor will ignor this message if it has been previously received.
 /// </param>
 public MessageProcessor(WsThreadManager threadManager, IWsTransportMessageProcessor processor)
 {
     m_threadManager = threadManager;
     m_processor     = processor;
 }