예제 #1
0
        public static async Task <TCPRconAsync> ActivateRconAsync(string Host, int port, string password)
        {
            var r = new TCPRconAsync(Host, port, password);
            await r.StartComms();

            return(r);
        }
예제 #2
0
        /// <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);
        }