Esempio n. 1
0
        public async Task TestCancelListenersAsync()
        {
            using (var con = new MikroTikConnection())
            {
                await con.ConnectAsync(Login, Password, Address, Port);

                var  task    = con.CancelListenersAsync();
                bool success = task.Wait(3000);
                Assert.True(success);
            }
        }
Esempio n. 2
0
        public async Task TestQuitAsync()
        {
            using (var con = new MikroTikConnection())
            {
                await con.ConnectAsync(Login, Password, Address, Port);

                bool success = await con.QuitAsync(2000);

                Assert.True(success);
            }
        }
Esempio n. 3
0
        public async Task TestCancelListenerAsync()
        {
            using (var con = new MikroTikConnection())
            {
                await con.ConnectAsync(Login, Password, Address, Port);

                var listener = con.Command("/ping")
                               .Attribute("address", "SERV.LAN")
                               .Proplist("time")
                               .Listen();

                var  task    = listener.CancelAsync();
                bool success = task.Wait(3000);
                Assert.True(success);
            }
        }