예제 #1
0
        public static int numReturns = 10; //number of game listings to return on a request


        public static void Main(string[] args)
        {
            MMServer.SetupMongo(connectionString, dbName); //init

            int listenPort;
            if (!int.TryParse(Environment.GetEnvironmentVariable("PORT"), out listenPort))
                listenPort = port;

            Console.WriteLine("...listening on port " + listenPort + "...");

            var wssv = new HttpServer(listenPort, false);
            
            
            wssv.AddWebSocketService<MMServer>(
                "/MM"
            );


            wssv.KeepClean = false;

                wssv.Start();
                //Console.ReadKey(true);
                Console.ReadLine ();
                while(true)
                {
                    Thread.Sleep(2);
                }

#endif
                wssv.Stop();
        } //end Main