Пример #1
0
        /// <summary>
        /// Main Methode to Close the Current Session!
        /// </summary>
        public void CloseCurrentSession()
        {
            LiveSession = false;
            //End the Recieve Session
            Receive_Singleton.Instance.EndSession();
            //Close Session
            if (TCP_Current != null)
            {
                TCP_Current.cmdClose();
                TCP_Current = null;
            }

            if (TCP_View_IsServer == true)
            {
                TCP_Viewer.SendAppServerPack(false);
            }
        }
Пример #2
0
        private void Connect()
        {
            //Get all the info
            string ip = ipaddress.Text;
            Settings_Singleton.Instance.IpAdress = ipaddress.Text;
            int portnr = Convert.ToInt16(port.Text);

            //Start the timer ( to time Timeouts )
            connectStopwatch = new Stopwatch();
            connectStopwatch.Start();

            //Start connecting
            connect = new TCPClient(ip, portnr);
            //Set TCP in Settings_Singleton
            Settings_Singleton.Instance.TCP_Current = connect;
            updateDialog.Start();
        }