/// <summary> /// MPCLient constructor with MPThreadStopCondition as a parameter. /// </summary> /// <param name="condition">The condition to stop the ProcessMessageThread.</param> public MPClient(MPSharedCondition condition) { StopMessageProcessingThread = condition ?? new MPSharedCondition(false); ResetConfig(); netClient = new NetClient(config); pts = new ParameterizedThreadStart(this.ProcessMessage); }
//Constructor /// <summary> /// Private Server constructor used in the singleton pattern. It initialized the config. /// </summary> public MPServer(MPSharedCondition condition) { stopProcessMessageThread = condition ?? new MPSharedCondition(false); ResetConfig(); pts = new ParameterizedThreadStart(this.ProcessMessage); messageProcessingThread = new Thread(pts); }