Exemplo n.º 1
0
        public Server(int port)
        {
            this.port    = port;
            activeTasks  = new List <Task>();
            usersHandler = new OnlineUsersHandler();
            isStarted    = false;

            try
            {
                certificate = SslTools.CreateCertificate(typeof(Server), "Server.Certificate.cert.pfx");
            }
            catch (CertificateException e)
            {
                log.Error("Can't create certificate. Server will not start.", e);
            }
        }
Exemplo n.º 2
0
		public Server(int port)
		{
			this.port = port;
			activeTasks = new List<Task>();
			usersHandler = new OnlineUsersHandler();
			isStarted = false;

			try
			{
				certificate = SslTools.CreateCertificate(typeof(Server), "Server.Certificate.cert.pfx");
			}
			catch (CertificateException e)
			{
				log.Info("Can't create certificate. Server will not start.");
				log.Error(e);
			}
		}