本文整理汇总了C#中RealmPacketIn.ToHexDump方法的典型用法代码示例。如果您正苦于以下问题:C# RealmPacketIn.ToHexDump方法的具体用法?C# RealmPacketIn.ToHexDump怎么用?C# RealmPacketIn.ToHexDump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RealmPacketIn
的用法示例。
在下文中一共展示了RealmPacketIn.ToHexDump方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DumpPacket
public static void DumpPacket(RealmPacketIn packet, PacketSender sender, bool copy, IndentTextWriter writer)
{
lock (writer)
{
try
{
if (copy)
{
using (var pkt = packet.Copy())
{
PacketAnalyzer.Dump(new ParsablePacketInfo(pkt, sender, DateTime.Now), writer);
}
}
else
{
PacketAnalyzer.Dump(new ParsablePacketInfo(packet, sender, DateTime.Now), writer);
}
}
catch (Exception e)
{
LogUtil.ErrorException(e, "Unable to parse/render packet " + packet);
writer.IndentLevel = 0;
writer.Write(packet.ToHexDump());
}
}
}
示例2: DumpPacket
public static void DumpPacket(RealmPacketIn packet, bool copy, IndentTextWriter writer)
{
try
{
if (copy)
{
using (PinnedRealmPacketIn pkt = packet.Copy())
{
PacketAnalyzer.Render(pkt, writer);
}
}
else
{
PacketAnalyzer.Render(packet, writer);
}
}
catch (Exception e)
{
log.ErrorException("Unable to parse/render packet " + packet, e);
writer.IndentLevel = 0;
writer.Write(packet.ToHexDump());
}
}