コード例 #1
0
        public AsyncHttpControl()
        {
            http = new HttpControl();

            background                     = new BackgroundWorker();
            background.DoWork             += new DoWorkEventHandler(background_DoWork);
            background.RunWorkerCompleted += new RunWorkerCompletedEventHandler(background_RunWorkerCompleted);

            busy  = false;
            error = false;
        }
コード例 #2
0
        /// <summary>
        /// Create a secure connection with a PHP script.
        /// </summary>
        public SecurePHPConnection()
        {
            connected = false;
            inUse     = false;

            http = new HttpControl();
            rsa  = new RSAtoPHPCryptography();
            aes  = new AEStoPHPCryptography();

            background                     = new BackgroundWorker();
            background.DoWork             += new DoWorkEventHandler(background_DoWork);
            background.RunWorkerCompleted += new RunWorkerCompletedEventHandler(background_RunWorkerCompleted);

            sender                     = new BackgroundWorker();
            sender.DoWork             += new DoWorkEventHandler(sender_DoWork);
            sender.RunWorkerCompleted += new RunWorkerCompletedEventHandler(sender_RunWorkerCompleted);
        }