(String ip, int port)
| 17 | public TaskCompletionSource<BLoginToken.Data> onLinkConnectedFuture = new TaskCompletionSource<>(); |
| 18 | |
| 19 | public void Start(String ip, int port) throws Exception { |
| 20 | var config = Config.load("client.xml"); |
| 21 | createZeze(config); |
| 22 | createService(); |
| 23 | createModules(); |
| 24 | Zeze.start(); // 启动数据库 |
| 25 | startModules(); // 启动模块,装载配置什么的。 |
| 26 | startService(); // 启动网络 |
| 27 | |
| 28 | loginQueueClient.setLoginToken((loginToken) -> { |
| 29 | var c = new OutObject<Connector>(); |
| 30 | ClientService.getConfig().tryGetOrAddConnector(loginToken.getLinkIp(), loginToken.getLinkPort(), true, c); |
| 31 | Connector = c.value; |
| 32 | Connector.start(); |
| 33 | Connector.GetReadySocket(); |
| 34 | onLinkConnectedFuture.setResult(loginToken); |
| 35 | }); |
| 36 | loginQueueClient.connect("127.0.0.1", 5020); |
| 37 | } |
| 38 | |
| 39 | public void Start2(String wsUrl) throws Exception { |
| 40 | var config = Config.load("client.xml"); |
no test coverage detected