コード例 #1
0
        public void Init()
        {
            _httpsv = new HttpServer(4649);
            //_httpsv.Sweeped = false;
            //_httpsv.AddWebSocketService<Echo>("/Echo");
            _httpsv.AddWebSocketService<KinectService>("/");

            _httpsv.OnGet += (sender, e) =>
            {
                onGet(e);
            };

            _httpsv.OnError += (sender, e) =>
            {
               write(e.Message);
            };

            _httpsv.Start();
            write(String.Format("HTTP Server listening on port: {0} service path:", _httpsv.Port));
            foreach (var path in _httpsv.ServicePaths)
                write(String.Format("  {0}", path));
            write("");

            write("Press any key to stop server...");
            //Console.ReadLine();

            //_httpsv.Stop();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: byTimo/Performance
 private static void ConfigureServer(string settingFilePath)
 {
     Server = new HttpServer();
     try
     {
         var settingDocument = ReadSettingXmlFile(settingFilePath);
         Server.Port = GetElementAttributeValue(settingDocument, "port", "value");
         Server.MaxConnection = GetElementAttributeValue(settingDocument, "max_connection", "value");
     }
     catch (Exception)
     {
         Console.WriteLine("Сервер сконфигурирован с настройками по умолчанию.");
     }
 }
コード例 #3
0
ファイル: MainConsole.cs プロジェクト: karliky/wowwow
 public static void Listen80()
 {
     httpServer = new HttpServer( World.ServerIP, World.HttpServerPort );
 }
コード例 #4
0
 public static void Listen80()
 {
     httpServer = new HttpServer(World.ServerIP, World.HttpServerPort);
 }
コード例 #5
0
ファイル: Program.cs プロジェクト: Dukhovnikov/ExamplesLib
 public static void Main(string[] args)
 {
     HttpServer.Run();
     Console.ReadKey();
 }
コード例 #6
0
        static void Main(string[] args)
        {
            HttpServer s = new HttpServer(8080);

            s.Start();
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: JarAKeksz/Batera
        static void Main(string[] args)
        {
            HttpServer server = new HttpServer(8000);

            server.run();
        }