Example #1
0
        public void SendReply(HttpReply reply, NodeBind dest, bool closeConnection)
        {
            numSentReply++;
            RequestReplyTable.AddReply(dest, reply);

            WebMessage m = new WebMessage()
            {
                Source          = localBind,
                Destiny         = dest,
                Payload         = reply,
                CloseConnection = closeConnection
            };

            // put in wire
            ResumeRouting(m);
        }
Example #2
0
        public void HandledReceiveMessageFromRoute(Route route, IHttpMessage message)
        {
            Message msg = null;

            if (message.ContentType == HttpConst.ContentTypeDodoNetObject)
            {
                msg = new DodoMessage();
            }
            else
            {
                msg = new WebMessage();
            }

            msg.Deserialization(this, route, message);

            // lanzamos el evento
            ReceiveMessageAsync(msg.Source, msg, route);
        }
Example #3
0
        public IAsyncResult BeginSendRequest(HttpRequest request,
                                             AsyncCallback callback, object state)
        {
            var dest = new NodeBind(request.Url);

            request.Async = new RequestAsyncResult(request, callback, state);

            // create transporter message
            var m = new WebMessage()
            {
                Source          = localBind,
                Destiny         = dest,
                CloseConnection = false
            };

            m.Payload = request;

            ResumeRouting(m);

            return((IAsyncResult)request.Async);
        }