/// <summary> /// This starts a network client. It uses the networkAddress property as the address to connect to. /// <para>This makes the newly created client connect to the server immediately.</para> /// </summary> public Task StartClient(string serverIp) { if (logger.LogEnabled()) { logger.Log("NetworkManager StartClient address:" + serverIp); } var builder = new UriBuilder { Host = serverIp, Scheme = client.Transport.Scheme.First(), }; return(client.ConnectAsync(builder.Uri)); }
/// <summary> /// This starts a network client. It uses the networkAddress and networkPort properties as the address to connect to. /// <para>This makes the newly created client connect to the server immediately.</para> /// </summary> public Task StartClient(string serverIp) { if (LogFilter.Debug) { Debug.Log("NetworkManager StartClient address:" + serverIp); } var builder = new UriBuilder { Host = serverIp, Scheme = "tcp4", }; return(client.ConnectAsync(builder.Uri)); }