private ClientInformation(PacketIn packet) { try { ProtocolVersion = packet.ReadByte(); var claimedRemainingLength = packet.ReadUInt16(); if (packet.RemainingLength != claimedRemainingLength) { Log.Warn(WCell_Core.Auth_Logon_with_invalid_length, claimedRemainingLength, packet.RemainingLength); } var clientInstallationType = packet.ReadFourCC(); _clientInstallationType = ClientTypeUtility.Lookup(clientInstallationType); Version = new ClientVersion(packet.ReadBytes(5)); Architecture = packet.ReadFourCC().TrimEnd('\0'); OS = packet.ReadFourCC().TrimEnd('\0'); var locale = packet.ReadFourCC(); _locale = ClientLocaleUtility.Lookup(locale); TimeZone = BitConverter.ToUInt32(packet.ReadBytes(4), 0); IPAddress = new XmlIPAddress(packet.ReadBytes(4)); Log.Info(WCell_Core.ClientInformationFourCCs, ProtocolVersion, ClientInstallationType, Version, Architecture, OS, Locale, TimeZone, IPAddress); } catch { } }
public SystemInformation() { m_Operating = OperatingSystem.Win; m_architecture = ProcessorArch.x86; Locale = "enUS"; TimeZone = 0x258; IPAddress = new XmlIPAddress(System.Net.IPAddress.Loopback); }
public ClientInformation() { m_operatingSys = OperatingSystem.Win; m_architecture = ProcessorArchitecture.x86; Locale = ClientLocale.English; TimeZone = 0x258; IPAddress = new XmlIPAddress(System.Net.IPAddress.Loopback); }
public override bool Equals(object obj) { XmlIPAddress xmlIpAddress = obj as XmlIPAddress; if (xmlIpAddress != null) { return(xmlIpAddress.IPAddress.Equals(IPAddress)); } return(false); }
private ClientInformation(PacketIn packet) { packet.SkipBytes(1); // 0 try { Version = new ClientVersion(packet.ReadBytes(5)); Architecture = packet.ReadReversedString(); OS = packet.ReadReversedString(); var localeStr = packet.ReadReversedPascalString(4); if (!ClientLocales.Lookup(localeStr, out m_Locale)) { m_Locale = WCellConstants.DefaultLocale; } TimeZone = BitConverter.ToUInt32(packet.ReadBytes(4), 0); IPAddress = new XmlIPAddress(packet.ReadBytes(4)); } catch { } }