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()); } }
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()); } }