Example #1
0
 public static bool SendAndWaitAnswer(string channelName, string destId, object packet, int timeout, out byte[] answer)
 {
     answer = null;
     try
     {
         MPProtectedChannel pc = GetChannel(channelName, timeout);
         if (pc == null)
         {
             return(false);
         }
         if (pc.SendAndWaitAnswer(destId, packet, timeout, out answer) == false)
         {
             pc.Close();
             return(false);
         }
         ReleaseChannel(pc);
         return(true);
     }
     catch //(Exception e)
     {
         //string s = e.ToString();
         //CLog.Log("BAD error: " + s);
         //CLog.LogError("BAD error: " + s);
     }
     return(false);
 }
Example #2
0
 public static void CloseChannel(MPProtectedChannel channel)
 {
     channel.Close();
 }