当前位置: 首页>>代码示例>>C#>>正文


C# WireProtocol.Reply方法代码示例

本文整理汇总了C#中WireProtocol.Reply方法的典型用法代码示例。如果您正苦于以下问题:C# WireProtocol.Reply方法的具体用法?C# WireProtocol.Reply怎么用?C# WireProtocol.Reply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WireProtocol的用法示例。


在下文中一共展示了WireProtocol.Reply方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RpcReceiveReply

        private void RpcReceiveReply(WireProtocol.IncomingMessage msg, WireProtocol.Commands.Debugging_Messaging_Reply reply)
        {
            WireProtocol.Commands.Debugging_Messaging_Address addr = reply.m_addr;
            EndPointRegistration eep;

            eep = RpcFind(addr.m_from_Type, addr.m_from_Id, false);

            WireProtocol.Commands.Debugging_Messaging_Reply.Reply res = new WireProtocol.Commands.Debugging_Messaging_Reply.Reply();

            res.m_found = (eep != null) ? 1u : 0u;
            res.m_addr = addr;

            msg.Reply(CreateConverter(), WireProtocol.Flags.c_NonCritical, res);

            if (eep != null)
            {
                lock (eep.m_req_Outbound.SyncRoot)
                {
                    foreach (EndPointRegistration.OutboundRequest or in eep.m_req_Outbound)
                    {
                        if (or.Seq == addr.m_seq && or.Type == addr.m_to_Type && or.Id == addr.m_to_Id)
                        {
                            or.Reply = reply.m_data;

                            break;
                        }
                    }
                }
            }
        }
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:30,代码来源:Engine+-+Original.cs

示例2: RpcReceiveQuery

        private void RpcReceiveQuery(WireProtocol.IncomingMessage msg, WireProtocol.Commands.Debugging_Messaging_Query query)
        {
            WireProtocol.Commands.Debugging_Messaging_Address addr = query.m_addr;
            EndPointRegistration eep = RpcFind(addr.m_to_Type, addr.m_to_Id, true);

            WireProtocol.Commands.Debugging_Messaging_Query.Reply res = new WireProtocol.Commands.Debugging_Messaging_Query.Reply();

            res.m_found = (eep != null) ? 1u : 0u;
            res.m_addr = addr;

            msg.Reply(CreateConverter(), WireProtocol.Flags.c_NonCritical, res);
        }
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:12,代码来源:Engine+-+Original.cs

示例3: RpcReceiveSend

        private void RpcReceiveSend(WireProtocol.IncomingMessage msg, WireProtocol.Commands.Debugging_Messaging_Send send)
        {
            WireProtocol.Commands.Debugging_Messaging_Address addr = send.m_addr;
            EndPointRegistration eep;

            eep = RpcFind(addr.m_to_Type, addr.m_to_Id, true);

            WireProtocol.Commands.Debugging_Messaging_Send.Reply res = new WireProtocol.Commands.Debugging_Messaging_Send.Reply();

            res.m_found = (eep != null) ? 1u : 0u;
            res.m_addr = addr;

            msg.Reply(CreateConverter(), WireProtocol.Flags.c_NonCritical, res);

            if (eep != null)
            {
                Message msgNew = new Message(eep.m_ep, addr, send.m_data);

                EndPointRegistration.InboundRequest ir = new EndPointRegistration.InboundRequest(eep, msgNew);

                ThreadPool.QueueUserWorkItem(new WaitCallback(RpcReceiveSendDispatch), ir);
            }
        }
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:23,代码来源:Engine+-+Original.cs

示例4: lock

        bool WireProtocol.IControllerHostLocal.ProcessMessage(WireProtocol.IncomingMessage msg, bool fReply)
        {
            msg.Payload = WireProtocol.Commands.ResolveCommandToPayload(msg.Header.m_cmd, fReply, m_capabilities);

            if (fReply == true)
            {
                Request reply = null;

                lock (m_requests.SyncRoot)
                {
                    foreach (Request req in m_requests)
                    {
                        if (req.MatchesReply(msg))
                        {
                            m_requests.Remove(req);

                            reply = req;
                            break;
                        }
                    }
                }

                if (reply != null)
                {
                    reply.Signal(msg);
                    return true;
                }
            }
            else
            {
                WireProtocol.Packet bp = msg.Header;

                switch (bp.m_cmd)
                {
                    case WireProtocol.Commands.c_Monitor_Ping:
                        {
                            WireProtocol.Commands.Monitor_Ping.Reply cmdReply = new Microsoft.SPOT.Debugger.WireProtocol.Commands.Monitor_Ping.Reply();

                            cmdReply.m_source = WireProtocol.Commands.Monitor_Ping.c_Ping_Source_Host;
                            cmdReply.m_dbg_flags = (m_stopDebuggerOnConnect ? WireProtocol.Commands.Monitor_Ping.c_Ping_DbgFlag_Stop : 0);

                            msg.Reply(CreateConverter(), WireProtocol.Flags.c_NonCritical, cmdReply);

                            m_evtPing.Set();

                            return true;
                        }

                    case WireProtocol.Commands.c_Monitor_Message:
                        {
                            WireProtocol.Commands.Monitor_Message payload = msg.Payload as WireProtocol.Commands.Monitor_Message;

                            Debug.Assert(payload != null);

                            if (payload != null)
                            {
                                QueueNotify(m_eventMessage, msg, payload.ToString());
                            }

                            return true;
                        }

                    case WireProtocol.Commands.c_Debugging_Messaging_Query:
                    case WireProtocol.Commands.c_Debugging_Messaging_Reply:
                    case WireProtocol.Commands.c_Debugging_Messaging_Send:
                        {
                            Debug.Assert(msg.Payload != null);

                            if (msg.Payload != null)
                            {
                                QueueRpc(msg);
                            }

                            return true;
                        }
                }
            }

            if (m_eventCommand != null)
            {
                QueueNotify(m_eventCommand, msg, fReply);
                return true;
            }

            return false;
        }
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:86,代码来源:Engine+-+Original.cs


注:本文中的WireProtocol.Reply方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。