示例#1
0
文件: WorkerRole.cs 项目: rutapon/vss
        public override void Run()
        {
            HttpServer httpServer;
            httpServer = new MyHttpServer(8080);
            Thread thread = new Thread(new ThreadStart(httpServer.listen));
            thread.Start();
            //return 0;

            //Class1.vlcSave();

            // This is a sample worker implementation. Replace with your logic.
            Trace.WriteLine("WorkerRole1 entry point called", "Information");

            while (true)
            {
                Thread.Sleep(10000);
                Trace.WriteLine("Working", "Information");
            }
        }
示例#2
0
 public static int Main(String[] args)
 {
     HttpServer httpServer;
     if (args.GetLength(0) > 0)
     {
         httpServer = new MyHttpServer(Convert.ToInt16(args[0]));
     }
     else
     {
         httpServer = new MyHttpServer(8080);
     }
     Thread thread = new Thread(new ThreadStart(httpServer.listen));
     thread.Start();
     return 0;
 }