mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Replace DnDns with HeijdenDns
HeijdenDns seems to do a better job at querying SRV records
This commit is contained in:
parent
a344ac4101
commit
693073edfc
112 changed files with 5491 additions and 5009 deletions
38
MinecraftClient/Protocol/Dns/Records/RecordA.cs
Normal file
38
MinecraftClient/Protocol/Dns/Records/RecordA.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue