Beispiel #1
0
        public OverlayReply SendRequest(OverlayRequest request, NodeBind dest)
        {
            OverlayReply       ret = null;
            RequestAsyncResult rar = BeginSendRequest(request, dest, null, null) as RequestAsyncResult;

            rar.AsyncWaitHandle.WaitOne(2000);
            ret = rar.Reply;
            return(ret);
        }
Beispiel #2
0
        public void EndSendRequest(IAsyncResult ar)
        {
            OverlayReply       ret   = null;
            RequestAsyncResult async = (RequestAsyncResult)ar;

            if (async.success)
            {
                ret = async.Reply;
            }
            else
            {
                throw async.exception;
            }
        }
Beispiel #3
0
        public void SendReply(OverlayReply reply, NodeBind dest)
        {
            numSentReply++;
            RequestReplyTable.AddReply(dest, reply);

            // create transporter message
            var m = new DodoMessage(reply)
            {
                Source  = localBind,
                Destiny = dest
            };

            // put in wire
            ResumeRouting(m);
        }