Пример #1
0
        /// <summary>
        /// 开启服务
        /// </summary>
        public void Start()
        {
            Stop();
            _model    = LoadModel();
            _pwdmodel = LoadPwdModel();
            _server   = null;

            _server = new ServerModel(_config.BindIP, _config.BindPort);
            _server.OnRequestProcessing  += new RequestProcessingHandle(_server_OnRequestProcessing);
            _server.OnRequestSendingBody += new RequestSendingBodyHandle(_server_OnRequestSendingBody);
            _server.StarServer();
        }
Пример #2
0
        private void btnListen_Click(object sender, EventArgs e)
        {
            sm                      = new ServerModel(cmbIP.Text, (int)nupPort.Value);
            txturl.Text             = "http://" + cmbIP.Text + ":" + (int)nupPort.Value + "/desktop";
            sm.OnRequestProcessing += new RequestProcessingHandle(sm_OnRequestProcessing);
            sm.StarServer();
            _cache = new DesktopCache(1000 / ((int)nupFPS.Value), chkIsMouse.Checked);
            ComboBoxItem selQry = cmbQty.SelectedItem as ComboBoxItem;

            if (selQry != null)
            {
                _cache.Qty = (long)selQry.Tag;
            }
            _cache.StarUpdate();
            Listening(true);
        }