C#之tcp自动更新程序

.NETTCP自动更新程序有如下几步骤:

第一步:服务端开启监听

ServiceHost host;
        private void button1_Click(object sender, EventArgs e)
        {
            host = new ServiceHost(typeof(WCFService.Service));
            host.Open();
            if (host.State == CommunicationState.Opened)
            {
                this.button1.Enabled = false;
                this.button2.Enabled = true;
            }
            this.label1.Text = host.State.ToString();
        }
View Code

相关文章:

  • 2021-10-26
  • 2021-12-03
  • 2021-08-18
  • 2021-12-18
  • 2021-11-11
  • 2021-11-01
  • 2021-10-13
猜你喜欢
  • 2020-11-16
  • 2022-02-09
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案