public bool HandleReply(ReqrepManager man, ReqrepManager.ReqrepType rt, int mid, PType prot, MemBlock payload, ISender returnpath, ReqrepManager.Statistics statistics, object state) { DateTime reply_time = DateTime.UtcNow; ListDictionary res_dict = new ListDictionary(); AHSender ah_rp = returnpath as AHSender; if (ah_rp != null) { res_dict["target"] = ah_rp.Destination.ToString(); } //Here are the number of microseconds res_dict["musec"] = (int)(1000.0 * ((reply_time - _start_time).TotalMilliseconds)); //Send the RPC result now; RpcManager my_rpc = System.Threading.Interlocked.Exchange(ref _rpc, null); if (my_rpc != null) { //We have not sent any reply yet: my_rpc.SendResult(_req_state, res_dict); } return(false); }
public bool HandleReply(ReqrepManager man, ReqrepManager.ReqrepType rt, int mid, PType prot, MemBlock payload, ISender from, ReqrepManager.Statistics s, object state) { Console.WriteLine("{0} got our message", from); return(false); }
/// <summary>This better be a SecureControl message!</summary> public bool HandleReply(ReqrepManager man, ReqrepManager.ReqrepType rt, int mid, PType prot, MemBlock payload, ISender returnpath, ReqrepManager.Statistics statistics, object state) { if (!prot.Equals(SecureControl)) { return(true); } bool done = false; try { HandleControl(payload, returnpath); } catch (Exception e) { ProtocolLog.WriteIf(ProtocolLog.Security, e.ToString()); done = true; } return(done); }