Example #1
0
	    private static void StartFileHost()
	    {
            hostFile = new FileServer.FileServer(int.Parse(ServerSettings.JMMServerFilePort));
            hostFile.Start();
//                new MessagingServer(new ServiceFactory(), new MessagingServerConfiguration(new HttpMessageFactory()));
 //           hostFile.Start(new IPEndPoint(IPAddress.Any, int.Parse(ServerSettings.JMMServerFilePort)));
	    }
        private static void StopHost()
        {
            // Close the ServiceHost.
            //host.Close();

            hostBinary?.Close();
            hostMetro?.Close();
            hostMetroImage?.Close();
            hostStreaming?.Close();
            hostImage?.Close();
            hostFile?.Stop();
            hostBinary = null;
            hostMetro = null;
            hostMetroImage = null;
            hostStreaming = null;
            hostImage = null;
            hostFile = null;

            /*if (hostNancy != null)
                hostNancy.Stop();
            */
        }