本文整理汇总了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 );
}
}
示例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 );
}
示例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();
}
}
示例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 );
}
示例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;
}
示例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 ();
}
}
示例7: DebugDump
private static void DebugDump(WireProtocol.IncomingMessage m, string text)
{
}
示例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;
}
示例9: Message
internal Message(EndPoint source, WireProtocol.Commands.Debugging_Messaging_Address addr, byte[] payload)
{
m_source = source;
m_addr = addr;
m_payload = payload;
}
示例10: SyncMessages
private WireProtocol.IncomingMessage[] SyncMessages(WireProtocol.OutgoingMessage[] messages)
{
return SyncMessages(messages, 2, 1000);
}
示例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;
}
}
示例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;
}
}
}
}
}
示例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 );
}
示例14: RuntimeValue_Array
protected internal RuntimeValue_Array( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
{
}
示例15: RuntimeValue_Object
protected internal RuntimeValue_Object( Engine eng, WireProtocol.Commands.Debugging_Value[] array, int pos ) : base( eng, array, pos )
{
}