static void InitClientExt()
        {
            var obj = new TcpClientQt();

            obj.OnConectado += Obj_OnConectado;

            var task = Task.Run(() => WorkExt(obj));

            obj.InitClientExt(44900, "172.16.5.239");
        }
        static int WorkExt(TcpClientQt obj)
        {
            for (; ;)
            {
                var c = Console.ReadKey();
                switch (c.Key)
                {
                case ConsoleKey.Escape:
                    obj.FinalizaClientExt();
                    return(0);

                default:
                    var s = c.KeyChar.ToString() + Console.ReadLine();
                    s += "\r\n";
                    obj.EnviaPacoteExt(s.Length, s);
                    break;
                }
            }
        }