コード例 #1
0
        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();
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
 public Task <Answer <Service <TMsg>, TMsg> > deliverAsk(RTAddress from, msg.MsgContext <Service <TMsg>, TMsg> ctx)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public void deliver(RTAddress from, msg.MsgContext <Service <TMsg>, TMsg> ctx)
 {
     m_q.Enqueue(ctx);
     //m_event.Set();
 }