Пример #1
0
 internal override void EncodeData(Span <byte> messageData, ref int currentPosition)
 {
     DnsMessageBase.EncodeUShort(messageData, ref currentPosition, Version);
     DnsMessageBase.EncodeUShort(messageData, ref currentPosition, (ushort)OperationCode);
     DnsMessageBase.EncodeUShort(messageData, ref currentPosition, (ushort)ErrorCode);
     DnsMessageBase.EncodeULong(messageData, ref currentPosition, Id);
     DnsMessageBase.EncodeUInt(messageData, ref currentPosition, (uint)LeaseTime.TotalSeconds);
 }
Пример #2
0
 protected internal override void EncodeRecordData(byte[] messageData, int offset, ref int currentPosition, Dictionary <string, ushort> domainNames)
 {
     DnsMessageBase.EncodeUShort(messageData, ref currentPosition, Preference);
     DnsMessageBase.EncodeULong(messageData, ref currentPosition, NodeID);
 }