Spinach.AsynchronousClient.SetSingleMsg C# (CSharp) Method

SetSingleMsg() public method

public SetSingleMsg ( String ip, String port, String msg ) : void
ip String
port String
msg String
return void
        public void SetSingleMsg(String ip, String port, String msg)
        {
            targetip = ip;
            targetport = port;
            SingleMsg = msg;
        }
        public void SetMultiMsg(Hashtable IPtoPeer, String msg, String self)

Usage Example

Example #1
0
 //*************************************
 public bool Join_Swarm(string DstIP, string DstPort,string SrcIP, string SrcPort,string Username)
 {
     Thread t1 = null;
     Thread t2 = null;
     try
     {
         t1 = new Thread(new ThreadStart(mSocket.StartListening));
         t1.Start();
         t1.IsBackground = true;
         string cpu = "1";
         mSocket.SetIP(SrcIP);
         mSocket.SetPort(SrcPort);
         mSocket.SetName(Username);
         mSocket.SetCPU(cpu);
         MessageGenerator msg = new MessageGenerator();
         string mMsg = msg.msgConnectionRequest
             (mSocket.GetIP(), mSocket.GetPort(), mSocket.GetName(), mSocket.GetCPU());
         AsynchronousClient client = new AsynchronousClient();
         client.SetSingleMsg(DstIP, DstPort, mMsg);
         t2 = new Thread(new ThreadStart(client.SendSingleClient));
         t2.Start();
         t2.IsBackground = true;
         return true;
    
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
         return false;
     }
     
 }
All Usage Examples Of Spinach.AsynchronousClient::SetSingleMsg