msgDisconnect() public method

public msgDisconnect ( String ipport ) : String
ipport String
return String
Beispiel #1
0
 public void Disconnect()
 {
     MessageGenerator temp = new MessageGenerator();
     string msg = temp.msgDisconnect(mPeer.mIP + ":" + mPeer.mPort);
     Thread t = null;
     AsynchronousClient client = new AsynchronousClient();
     client.SetMultiMsg(GetIPtoPeer(), msg, GetIP() + ":" + GetPort());
     t = new Thread(new ThreadStart(client.SendMultiClient));
     t.Start();
     t.IsBackground = true;
 }
Beispiel #2
0
        public void Disconnect()
        {
            try
            {
                MessageGenerator temp = new MessageGenerator();
                string msg = temp.msgDisconnect(mPeer.mIP + ":" + mPeer.mPort);
                Thread t = null;
                AsynchronousClient client = new AsynchronousClient();
                client.SetMultiMsg(GetIPtoPeer(), msg, GetIP() + ":" + GetPort());

                t = new Thread(new ThreadStart(client.SendMultiClient));
                t.IsBackground = true;
                t.Start();
            }
            catch (Exception e)
            { Console.WriteLine(e.ToString()); }
        }