Пример #1
0
        public string OpenTCPTunnel(string remoteHost, int remotePort)
        {
            var Status = Task.Factory.StartNew(() => NabtoManager.OpenTCPTunnel(remoteHost, remotePort));
            //   Debug.WriteLine("Tunnel result=" + Status.Result.ToString());
            string LocalStatus = string.Empty;

            if (Status.Result == nabto_status_t.Ok)
            {
                LocalStatus = "OK";
            }

            Debug.WriteLine("Tunnel Status=" + LocalStatus);

            return(LocalStatus.ToString());
        }
Пример #2
0
        public string ShutDownTunnel()
        {
            var Status = Task.Factory.StartNew(() => NabtoManager.CloseTunnel());

            return(Status.Result.ToString());
        }
Пример #3
0
        public string GetTunnelState()
        {
            var State = Task.Factory.StartNew(() => NabtoManager.GetTunnelState());

            return(State.Result.ToString());
        }
Пример #4
0
        public string GetRpcInvoke(string XMLData, string URL)
        {
            var Status = Task.Factory.StartNew(() => NabtoManager.CallQuery(URL, XMLData));

            return(Status.Result.ToString());
        }
Пример #5
0
        public string CreatSession(string UserName, string Password)
        {
            var Status = Task.Factory.StartNew(() => NabtoManager.OpenSession(UserName, Password));

            return(Status.Result.ToString());
        }
Пример #6
0
 public void StartUp()
 {
     Task.Factory.StartNew(() => NabtoManager.StartNabtoClient());
     // Task.Factory.StartNew(() => NabtoManager.TestAPI_RPInvoke());
 }
Пример #7
0
 public void StartUp()
 {
     Task.Factory.StartNew(() => NabtoManager.StartNabtoClient());
 }