public CommFacility(AppWorker appWorker, ConversationFactory factory) { myAppWorker = appWorker; this.factory = factory; factory.ManagingCommFacility = this; convDictionary = new ConversationDictionary(); udpCommunicator = new UdpCommunicator(); }
/// <summary> /// This methods setup up all of the components in a CommFacility. Call this method /// sometime after setting the MinPort, MaxPort, and ConversationFactory /// </summary> public void Initialize() { udpCommunicator = new UdpCommunicator() { MinPort = 10000, MaxPort = 20000, Timeout = 3000, EnvelopeHandler = DelegateToConversation }; }
/// <summary> /// This method stops all of the active components of a CommFacility and release the /// releases (or at least allows them to be garabage collected. Once stop is called, /// a CommFacility cannot be restarted with setting it up from scratch. /// </summary> public void Stop() { Logger.Debug("Entering Stop"); if (udpCommunicator != null) { udpCommunicator.Stop(); udpCommunicator = null; } Logger.Debug("Leaving Stop"); }