Ejemplo n.º 1
0
 void AsyncRemoteCallHandler(ulong msgId, byte[] data)
 {
     Task.Run(() =>
     {
         sm.AsyncAnswerOnRemoteCall(msgId, new Tuple <bool, byte[]>(true, new byte[] { 5 }));
     });
 }
Ejemplo n.º 2
0
        void AsyncRemoteCallHandler(ulong msgId, byte[] data)
        {
            //sm.AsyncAnswerOnRemoteCall(msgId, new Tuple<bool, byte[]>(true, new byte[] { 9 }));
            //System.Threading.Thread.Sleep(50000);

            //System.Threading.Thread.Sleep(40000);
            sm.AsyncAnswerOnRemoteCall(msgId, new Tuple <bool, byte[]>(true, new byte[1]));

            //if(data != null && data.Length>0)
            //{
            //    if(data[0] == 1)
            //    {
            //        System.Threading.Thread.Sleep(10000);
            //        sm.AsyncAnswerOnRemoteCall(msgId, new Tuple<bool, byte[]>(true, data));
            //    }
            //    else
            //    {
            //        sm.AsyncAnswerOnRemoteCall(msgId, new Tuple<bool, byte[]>(true, data));
            //    }
            //}


            //Task.Run(() =>
            //{
            //    //sm.AsyncAnswerOnRemoteCall(msgId, new Tuple<bool, byte[]>(true, new byte[] { 9, 4, 12, 17, 25 }));
            //    sm.AsyncAnswerOnRemoteCall(msgId, new Tuple<bool, byte[]>(true, new byte[] { 9 }));
            //}
            //);
        }