Ejemplo n.º 1
0
        public static void PuppetMasterCommandsIntAsyncCallBack(IAsyncResult ar)
        {
            PuppetMasterAsyncIntDelegate del = (PuppetMasterAsyncIntDelegate)((AsyncResult)ar).AsyncDelegate;

            del.EndInvoke(ar);
            return;
        }
Ejemplo n.º 2
0
 public void Interval(string opId, int x_mls)
 {
     try
     {
         if (nodes != null && nodes[opId] != null)
         {
             PuppetMasterAsyncIntDelegate remoteDel = new PuppetMasterAsyncIntDelegate(nodes[opId].Interval);
             AsyncCallback puppetCallback           = new AsyncCallback(PuppetMasterCommandsIntAsyncCallBack);
             remoteDel.BeginInvoke(x_mls, puppetCallback, null);
         }
     } catch (KeyNotFoundException knfe)
     {
         Console.WriteLine($"Puppet master could not find operator {opId}");
     } catch (SocketException se)
     {
         Console.WriteLine($"Due to connection problems, puppet master couldn't invoke Interval on operator {opId} ");
     }
 }