Exemple #1
0
        public override void Deserialize(BinaryReader reader)
        {
            base.Deserialize(reader);

            TimeToLive = NetworkHelper.Nthos(reader.ReadUInt32());
        }
Exemple #2
0
 public virtual void Deserialize(BinaryReader reader)
 {
     Hostname = reader.ReadDnsHostname();
     Type     = (DnsRecordType)NetworkHelper.Nthos(reader.ReadUInt16());
     Class    = (DnsRecordClass)NetworkHelper.Nthos(reader.ReadUInt16());
 }
Exemple #3
0
 public static void ParseDnsRecordHeader(BinaryReader reader, out string hostname, out DnsRecordType type, out DnsRecordClass @class)
 {
     hostname = reader.ReadDnsHostname();
     type     = (DnsRecordType)NetworkHelper.Nthos(reader.ReadUInt16());
     @class   = (DnsRecordClass)NetworkHelper.Nthos(reader.ReadUInt16());
 }
Exemple #4
0
 public virtual void Serialize(BinaryWriter writer)
 {
     writer.WriteDnsHostname(Hostname);
     writer.Write(NetworkHelper.Nthos((ushort)Type));
     writer.Write(NetworkHelper.Nthos((ushort)Class));
 }