Esempio n. 1
0
        static void Main(string[] args)
        {
            PushServer server = new PushServer();

            server.Start();

            while (true)
            {
                Console.Clear();

                Console.WriteLine("{0}", DateTime.Now);

                Thread.Sleep(1000);
            }
        }
Esempio n. 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            PushServer.Start();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseCors(builder => builder
                        .AllowAnyOrigin()
                        .AllowAnyHeader()
                        .AllowAnyMethod()
                        );

            app.UseMvc();
        }
Esempio n. 3
0
 protected override void OnStart(string[] args)
 {
     server = builder.Build(Port, MaxConnect);
     server.Start();
     //Program.Start(args);
 }