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


C# WireProtocol类代码示例

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


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

示例1: RuntimeValue_Indirect

 protected internal RuntimeValue_Indirect( Engine eng, WireProtocol.Commands.Debugging_Value[] array, int pos ) : base( eng, array[pos] )
 {
     if(++pos < array.Length)
     {
         m_value = Convert( eng, array, pos );
     }
 }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:7,代码来源:RuntimeValue_Indirect.cs

示例2: RuntimeValue_Primitive

        protected internal RuntimeValue_Primitive( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
        {
            Type t;

            switch((RuntimeDataType)handle.m_dt)
            {
            case RuntimeDataType.DATATYPE_BOOLEAN: t = typeof( bool  ); break;
            case RuntimeDataType.DATATYPE_I1     : t = typeof(sbyte  ); break;
            case RuntimeDataType.DATATYPE_U1     : t = typeof( byte  ); break;

            case RuntimeDataType.DATATYPE_CHAR   : t = typeof( char  ); break;
            case RuntimeDataType.DATATYPE_I2     : t = typeof( short ); break;
            case RuntimeDataType.DATATYPE_U2     : t = typeof(ushort ); break;

            case RuntimeDataType.DATATYPE_I4     : t = typeof( int   ); break;
            case RuntimeDataType.DATATYPE_U4     : t = typeof(uint   ); break;
            case RuntimeDataType.DATATYPE_R4     : t = typeof( float ); break;

            case RuntimeDataType.DATATYPE_I8     : t = typeof( long  ); break;
            case RuntimeDataType.DATATYPE_U8     : t = typeof(ulong  ); break;
            case RuntimeDataType.DATATYPE_R8     : t = typeof( double); break;

            default: throw new ArgumentException( String.Format( "Not a primitive: {0}", handle.m_dt ) );
            }

            m_value = System.Runtime.Serialization.FormatterServices.GetUninitializedObject( t );

            m_eng.CreateConverter().Deserialize( m_value, handle.m_builtinValue );
        }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:29,代码来源:RuntimeValue_Primitive.cs

示例3: RuntimeValue_ByRef

 protected internal RuntimeValue_ByRef( Engine eng, WireProtocol.Commands.Debugging_Value[] array, int pos ) : base( eng, array, pos )
 {
     if(m_value == null && m_handle.m_arrayref_referenceID != 0)
     {
         m_value = m_eng.GetArrayElement( m_handle.m_arrayref_referenceID, m_handle.m_arrayref_index );
     }
  
     if(m_value == null)
     {
         throw new ArgumentException();
     }            
 }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:12,代码来源:RuntimeValue_ByRef.cs

示例4: RuntimeValue_String

        protected internal RuntimeValue_String( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
        {
            byte[] buf = handle.m_builtinValue;

            if(handle.m_bytesInString >= buf.Length)
            {
                if(m_eng.ReadMemory( m_handle.m_charsInString, m_handle.m_bytesInString, out buf ) == false)
                {
                    // Revert to the preview on failure
                    buf = handle.m_builtinValue;
                }
            }

            m_value = WireProtocol.Commands.GetZeroTerminatedString( buf, true );
        }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:15,代码来源:RuntimeValue_String.cs

示例5: PcapParser

        public PcapParser(string pcappath, string serverIp, string clientIp)
        {
            _serverIp = serverIp;
            _clientIp = clientIp;

            _capturedPackets = new List<PacketWrapper>();
            _serverWireProtocol = new WireProtocol<ConanPacket>();
            _clientWireProtocol = new WireProtocol<ConanPacket>();

            _device = new CaptureFileReaderDevice(pcappath)
            {
                //Filter = "(ip and tcp) and (host " + serverIp + " or host " + clientIp + ")"
                Filter = "(ip and tcp) and host " + serverIp
            };
            _device.OnPacketArrival += OnPacketArrival;
        }
开发者ID:wwhitehead,项目名称:ProjectFaolan,代码行数:16,代码来源:PcapParser.cs

示例6: DecodeEventInfo

		Event DecodeEventInfo (WireProtocol.EventInfo info) {
			EventRequest req = FindRequest (info.requestId);
			if (info.eventKind == WireProtocol.EVENT_VM_START) {
				WireProtocol.VMStartEventInfo einfo = (WireProtocol.VMStartEventInfo)info;
				return new VMStartEventImpl (vm, req, new ThreadReferenceImpl (vm, einfo.thread), new AppDomainMirrorImpl (vm, einfo.domain));
			} else if (info.eventKind == WireProtocol.EVENT_VM_DEATH) {
				return new VMDeathEventImpl (vm, req);
			} else if (info.eventKind == WireProtocol.EVENT_THREAD_START) {
				WireProtocol.ThreadStartEventInfo einfo = (WireProtocol.ThreadStartEventInfo)info;
				return new ThreadStartEventImpl (vm, req, new ThreadReferenceImpl (vm, einfo.thread));
			} else if (info.eventKind == WireProtocol.EVENT_THREAD_DEATH) {
				WireProtocol.ThreadDeathEventInfo einfo = (WireProtocol.ThreadDeathEventInfo)info;
				return new ThreadDeathEventImpl (vm, req, new ThreadReferenceImpl (vm, einfo.thread));
			} else {
				throw new NotImplementedException ();
			}
		}
开发者ID:shana,项目名称:Mono.Debugger.Soft,代码行数:17,代码来源:EventQueueImpl.cs

示例7: DebugDump

		private static void DebugDump(WireProtocol.IncomingMessage m, string text)
		{
		}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:3,代码来源:WinUsbStream.cs

示例8: MatchesReply

            internal bool MatchesReply(WireProtocol.IncomingMessage res)
            {
                WireProtocol.Packet headerReq = m_req.Header;
                WireProtocol.Packet headerRes = res.Header;

                if (headerReq.m_cmd == headerRes.m_cmd &&
                   headerReq.m_seq == headerRes.m_seqReply)
                {
                    return true;
                }

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

示例9: Message

 internal Message(EndPoint source, WireProtocol.Commands.Debugging_Messaging_Address addr, byte[] payload)
 {
     m_source = source;
     m_addr = addr;
     m_payload = payload;
 }
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:6,代码来源:Engine+-+Original.cs

示例10: SyncMessages

 private WireProtocol.IncomingMessage[] SyncMessages(WireProtocol.OutgoingMessage[] messages)
 {
     return SyncMessages(messages, 2, 1000);
 }
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:4,代码来源:Engine+-+Original.cs

示例11: SyncRequest

        internal WireProtocol.IncomingMessage SyncRequest(WireProtocol.OutgoingMessage msg, int retries, int timeout)
        {
            /// Lock on m_ReqSyncLock object, so only one thread is active inside the block.
            lock (m_ReqSyncLock)
            {
                Request req = AsyncRequest(msg, retries, timeout);

                return req != null ? req.Wait() : null;
            }
        }
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:10,代码来源:Engine+-+Original.cs

示例12: 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

示例13: RuntimeValue_Reflection

        protected internal RuntimeValue_Reflection( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
        {
            m_rd = (ReflectionDefinition)System.Runtime.Serialization.FormatterServices.GetUninitializedObject( typeof(ReflectionDefinition) );

            m_eng.CreateConverter().Deserialize( m_rd, handle.m_builtinValue );
        }
开发者ID:awakegod,项目名称:NETMF-LPC,代码行数:6,代码来源:Values.cs

示例14: RuntimeValue_Array

 protected internal RuntimeValue_Array( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
 {
 }
开发者ID:awakegod,项目名称:NETMF-LPC,代码行数:3,代码来源:Values.cs

示例15: RuntimeValue_Object

 protected internal RuntimeValue_Object( Engine eng, WireProtocol.Commands.Debugging_Value[] array, int pos ) : base( eng, array, pos )
 {
 }
开发者ID:awakegod,项目名称:NETMF-LPC,代码行数:3,代码来源:Values.cs


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