public void send(RTAddress from, TMsg msg, Func <TSource, bool> fn) { var ctx = new msg.MsgContext <TSource, TMsg>(from, msg, fn, false); m_q.Enqueue(ctx); //m_wait.Set(); }
public Task <msg.Answer <TSource, TMsg>[]> ask(RTAddress from, TMsg msg, Func <TSource, bool> fn) { var ctx = new msg.MsgContext <TSource, TMsg>(from, msg, fn, true); m_q.Enqueue(ctx); //m_wait.Set(); // @@@@ PORT ASK return(null); }
public void broadcast(RTAddress from, TMsg msg) { var ctx = new msg.MsgContext <TSource, TMsg>(from, msg, (svc) => true, false); foreach (var svc in m_services) { svc.Value.deliver(from, ctx); } //m_wait.Set(); }
public void send(RTAddress from, RTAddress to, TMsg msg) { var ctx = new msg.MsgContext <TSource, TMsg>(from, msg, (svc) => svc.id == to.Source, false); if (m_services.TryGetValue(to.Source, out var svc)) { svc.deliver(from, ctx); } else { m_q.Enqueue(ctx); } //m_wait.Set(); }
public Task <Answer <Service <TMsg>, TMsg> > deliverAsk(RTAddress from, msg.MsgContext <Service <TMsg>, TMsg> ctx) { throw new NotImplementedException(); }
public void deliver(RTAddress from, msg.MsgContext <Service <TMsg>, TMsg> ctx) { m_q.Enqueue(ctx); //m_event.Set(); }