public static async Task <TCPRconAsync> ActivateRconAsync(string Host, int port, string password) { var r = new TCPRconAsync(Host, port, password); await r.StartComms(); return(r); }
/// <summary> /// Clones the current connection allowing another session to the rcon server. /// </summary> /// <returns>Return TCPRcon with the same host,port, and password.</returns> public async Task <TCPRconAsync> CopyConnection() { TCPRconAsync r = new TCPRconAsync(RConHost, RConPort, RConPass); if (await r.StartComms() == false) { return(null); } return(r); }