Esempio n. 1
0
        private void WCFTcpServerForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            WCFTcpServer.GetInstance().BrodCastMessage(WCFMessageKind.State, CommunicationState.Closed.ToString());
            serviceHost.Close(new TimeSpan(0, 0, 0, 0, 10));

            timerPoll.Enabled = false;
        }
Esempio n. 2
0
        public static WCFTcpServer GetInstance()
        {
            if (Instance == null)
            {
                Instance = new WCFTcpServer();
            }

            return(Instance);
        }
Esempio n. 3
0
        private void buttonClose_Click(object sender, EventArgs e)
        {
            switch (serviceHost.State)
            {
            case CommunicationState.Opened:
                WCFTcpServer.GetInstance().BrodCastMessage(WCFMessageKind.State, CommunicationState.Closed.ToString());
                serviceHost.Close(new TimeSpan(0, 0, 0, 0, 10));

                timerPoll.Enabled = false;
                return;
            }
        }
Esempio n. 4
0
 private void buttonSend_Click(object sender, EventArgs e)
 {
     //WCFTcpServer.GetInstance().BrodCast(textBoxMessage.Text);
     WCFTcpServer.GetInstance().BrodCastMessage(WCFMessageKind.Message, textBoxMessage.Text);
 }
Esempio n. 5
0
 ////클라이언트들을 모을 배열이다.
 private WCFTcpServer()
 {
     Instance = this;
 }