public void Awake(string address) { try { NetOuterComponent networkComponent = Game.Scene.GetComponent <NetOuterComponent>(); for (int i = 0; i < 1000; i++) { TestAsync(networkComponent, i, address); } } catch (Exception e) { Log.Exception(e); } }
public void Awake(string address) { try { IPEndPoint ipEndPoint = NetworkHelper.ToIPEndPoint(address); NetOuterComponent networkComponent = Game.Scene.GetComponent <NetOuterComponent>(); for (int i = 0; i < 2000; i++) { TestAsync(networkComponent, ipEndPoint, i); } } catch (Exception e) { Log.Exception(e); } }
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 Send(session, j); } } } catch (Exception e) { Log.Exception(e); } }
public async void TestAsync(NetOuterComponent networkComponent, int j, string address) { try { using (Session session = networkComponent.Create(address)) { int i = 0; while (i < 100000000) { ++i; await Send(session, j); } } } catch (RpcException e) { Log.Exception(e); } catch (Exception e) { Log.Exception(e); } }