Beispiel #1
0
 public void TCPClientWork()
 {
     try
     {
         while (Switch)
         {
             Console.WriteLine("等待Server訊息");
             ClientEventArgs CEA = new ClientEventArgs
             {
                 CommunicationBase = CB,
                 Message           = CB.ReceiveMsg()
             };
             Console.WriteLine("收到Server訊息");
             Event.ClientEventCall(CEA);
         }
     }
     catch
     {
         Console.WriteLine("伺服器端強制關閉連線!");
         Server.Close();
     }
 }
Beispiel #2
0
 public void ClientEventCall(ClientEventArgs e)
 {
     ClientEventHandler(this, e);
 }