本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadIPAddress方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadIPAddress方法的具体用法?C# Packet.ReadIPAddress怎么用?C# Packet.ReadIPAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.ReadIPAddress方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleVoiceRosterUpdate
public static void HandleVoiceRosterUpdate(Packet packet)
{
packet.ReadGuid("Group GUID");
packet.ReadInt16("Channel ID");
packet.ReadByte("Channel Type"); // 0: channel, 2: party
packet.ReadCString("Channel Name");
packet.WriteLine("Encryption Key: " + Utilities.ByteArrayToHexString(packet.ReadBytes(16)));
packet.WriteLine("IP: " + packet.ReadIPAddress());
packet.ReadInt16("Voice Server Port");
var count = packet.ReadByte("Player Count");
packet.ReadGuid("Leader GUID");
var leaderFlags1 = packet.ReadByte();
packet.WriteLine("Leader Flags 1: 0x" + leaderFlags1.ToString("X2"));
var leaderFlags2 = packet.ReadByte();
packet.WriteLine("Leader Flags 2: 0x" + leaderFlags2.ToString("X2"));
for (var i = 0; i < count - 1; i++)
{
packet.ReadGuid("Player GUID");
packet.ReadByte("Index");
var flags1 = packet.ReadByte();
packet.WriteLine("Flags 1: 0x" + flags1.ToString("X2"));
var flags2 = packet.ReadByte();
packet.WriteLine("Flags 2: 0x" + flags2.ToString("X2"));
}
}
示例2: HandleVoiceRosterUpdate
public static void HandleVoiceRosterUpdate(Packet packet)
{
packet.ReadGuid("Group GUID");
packet.ReadInt16("Channel ID");
packet.ReadByte("Channel Type"); // 0: channel, 2: party
packet.ReadCString("Channel Name");
packet.ReadBytes("Encryption Key", 16);
packet.ReadIPAddress("IP");
packet.ReadInt16("Voice Server Port");
var count = packet.ReadByte("Player Count");
packet.ReadGuid("Leader GUID");
var leaderFlags1 = packet.ReadByte();
packet.AddValue("Leader Flags 1", "0x" + leaderFlags1.ToString("X2"));
var leaderFlags2 = packet.ReadByte();
packet.AddValue("Leader Flags 2", "0x" + leaderFlags2.ToString("X2"));
for (var i = 0; i < count - 1; i++)
{
packet.ReadGuid("Player GUID");
packet.ReadByte("Index");
var flags1 = packet.ReadByte();
packet.AddValue("Flags 1", "0x" + flags1.ToString("X2"));
var flags2 = packet.ReadByte();
packet.AddValue("Flags 2", "0x" + flags2.ToString("X2"));
}
}
示例3: HandleRedirectClient
public static void HandleRedirectClient(Packet packet)
{
var ip = packet.ReadIPAddress();
packet.WriteLine("IP Address: {0}", ip);
packet.ReadUInt16("Port");
packet.ReadInt32("Token");
var hash = packet.ReadBytes(20);
packet.WriteLine("Address SHA-1 Hash: {0}", Utilities.ByteArrayToHexString(hash));
}
示例4: HandleConnectToFailed
public static void HandleConnectToFailed(Packet packet)
{
packet.WriteLine("IP Address: {0}", packet.ReadIPAddress());
packet.ReadByte("Reason?");
}
示例5: HandleRedirectClient
public static void HandleRedirectClient(Packet packet)
{
packet.ReadIPAddress("IP Address");
packet.ReadUInt16("Port");
packet.ReadInt32("Token");
packet.ReadBytes("Address SHA-1 Hash", 20);
}
示例6: HandleRedirectClient
public static void HandleRedirectClient(Packet packet)
{
var ip = packet.ReadIPAddress();
packet.Writer.WriteLine("IP Address: " + ip);
var port = packet.ReadUInt16();
packet.Writer.WriteLine("Port: " + port);
var unk = packet.ReadInt32();
packet.Writer.WriteLine("Token: " + unk);
var hash = packet.ReadBytes(20);
packet.Writer.WriteLine("Address SHA-1 Hash: " + Utilities.ByteArrayToHexString(hash));
}