コード例 #1
0
ファイル: SimpleHttpServer.cs プロジェクト: AccessDostup/d2
        public static int Main(string[] args)
        {
            /*
            //--------запуск проверки--------

            Services serv = new Services();
            serv.services();

            //--------------------------------
            */
            //отправка смс сообщения обязательно номер начинается с +
            //SendSMS.Send( "привет", "+79113214073", "COM5");
            HttpServer httpServer;
            if (args.GetLength(0) > 0) {
                httpServer = new HttpServer();
                httpServer.HttpServerP(Convert.ToInt16(args[0]));
            } else {
                httpServer = new HttpServer();
                httpServer.HttpServerP(8080);
            }

            Thread thread = new Thread(new ThreadStart(httpServer.listen));
            thread.Start();
            return 0;
        }
コード例 #2
0
 public HttpProcessor(TcpClient s, HttpServer srv)
 {
     this.socket = s;
     this.srv = srv;
 }
コード例 #3
0
        private static int MAX_POST_SIZE = 10 * 1024 * 1024; // 10MB

        public HttpProcessor(TcpClient s, HttpServer srv)
        {
            this.socket = s;
            this.srv    = srv;
        }