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); }
public static void CloseChannel(MPProtectedChannel channel) { channel.Close(); }