コード例 #1
0
        public void start()
        {
            java.net.ServerSocket server = new java.net.ServerSocket(this.port);
            // Create a receiver main loop...
            this.running = true;
            while (this.running)
            {
                // waiting for connect...
                java.net.Socket client = server.accept();

                // create new thread for work
                java.lang.Thread worker = new java.lang.Thread(new SampleSimpleHttpServerWorker(client));
                worker.start();
            }
        }
コード例 #2
0
ファイル: SampleSimpleHttpServer.cs プロジェクト: gadfly/nofs
        public void start()
        {
            java.net.ServerSocket server = new java.net.ServerSocket(this.port);
            // Create a receiver main loop...
            this.running = true;
            while (this.running)
            {
                // waiting for connect...
                java.net.Socket client = server.accept();

                // create new thread for work
                java.lang.Thread worker = new java.lang.Thread(new SampleSimpleHttpServerWorker(client));
                worker.start();
            }
        }