mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
39 lines
721 B
C#
39 lines
721 B
C#
|
|
using System;
|
||
|
|
/*
|
||
|
|
3.4.1. A RDATA format
|
||
|
|
|
||
|
|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||
|
|
| ADDRESS |
|
||
|
|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||
|
|
|
||
|
|
where:
|
||
|
|
|
||
|
|
ADDRESS A 32 bit Internet address.
|
||
|
|
|
||
|
|
Hosts that have multiple Internet addresses will have multiple A
|
||
|
|
records.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
namespace Heijden.DNS
|
||
|
|
{
|
||
|
|
public class RecordA : Record
|
||
|
|
{
|
||
|
|
public System.Net.IPAddress Address;
|
||
|
|
|
||
|
|
public RecordA(RecordReader rr)
|
||
|
|
{
|
||
|
|
System.Net.IPAddress.TryParse(string.Format("{0}.{1}.{2}.{3}",
|
||
|
|
rr.ReadByte(),
|
||
|
|
rr.ReadByte(),
|
||
|
|
rr.ReadByte(),
|
||
|
|
rr.ReadByte()), out this.Address);
|
||
|
|
}
|
||
|
|
|
||
|
|
public override string ToString()
|
||
|
|
{
|
||
|
|
return Address.ToString();
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|