Exemple #1
0
 public void Awake(IPEndPoint ipEndPoint)
 {
     try
     {
         NetOuterComponent networkComponent = Game.Scene.GetComponent <NetOuterComponent>();
         for (int i = 0; i < 100; i++)
         {
             this.TestAsync(networkComponent, ipEndPoint, i);
         }
     }
     catch (Exception e)
     {
         Log.Error(e.ToString());
     }
 }
Exemple #2
0
 public async void TestAsync(NetOuterComponent networkComponent, IPEndPoint ipEndPoint, int j)
 {
     try
     {
         using (Session session = networkComponent.Create(ipEndPoint))
         {
             int i = 0;
             while (i < 100000000)
             {
                 ++i;
                 await this.Send(session, j);
             }
         }
     }
     catch (RpcException e)
     {
         Log.Error(e.ToString());
     }
     catch (Exception e)
     {
         Log.Error(e.ToString());
     }
 }