Example #1
0
 private bool check_remotehosts(RemoteHost obj)
 {
     if (obj.ID == destroyport)
     {
         obj.disconnect();
         return(true);
     }
     else
     {
         return(false);
     }
 }
 private bool check_remotehosts(RemoteHost obj)
 {
     if (obj.ID == destroyport)
     {
         obj.disconnect();
         return true;
     }
     else
     {
         return false;
     }
 }
 private bool atPort(RemoteHost obj)
 {
     if (int.Parse(obj.remotePort) == id_port)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Example #4
0
        /// <summary>
        /// 接続を切断します。
        /// </summary>
        public void disconnect()
        {
            try
            {
                this.debugwindow.DebugLog = "[Port:" + this.ID.ToString() + "]切断します.";
                UP_Cliant.Close();
                this.data = null;
                if (this.connect_host != null)
                {
                    this.connect_host.connect_host = null;
                    this.connect_host = null;
                }

                CTS.Cancel();
                isConnected = false;
                this.UP_Encoder = null;
                this.UP_Decoder = null;

                this.UP_Cliant = null;

                this.DataReceived = null;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + "接続の切断に失敗しました。");
            }
            finally
            {
            }
        }
Example #5
0
 private bool HostFindFromPort_sender(RemoteHost obj)
 {
     if (int.Parse(this.sender_port.Text) == obj.ID)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Example #6
0
 private bool HostFindFromNetwork_sender(RemoteHost obj)
 {
     if (this.checkid_sender == obj.ID)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Example #7
0
 private bool HostFindFromFile_sender(RemoteHost obj)
 {
     if (checkid_sender == int.Parse(obj.remotePort))
     {
         return true;
     }
     else
     {
         return false;
     }
 }