Function Domain.fromBinary

Support for network deserialization

T fromBinary(T) (
  scope ref DNSDeserializerContext ctx
) @safe;

We will receive the domain name encoded. Each label starts with the length of the label. Each domain name ends with the empty label. Hence, if we were to receive the string 5agora8bosagora2io0, it would decode to agora.bosagora.io.. The final dot (root domain) is usually omitted, although the struct always keeps it for simplicity.

Labels cannot be more than 63 characters, and the full domain is limited to 255 octets. If a label length has a numeric value > 63, it is a pointer to a previously seen domain / label.

Note

This method is not called directly by the deserializer, as it needs to support arbitrary pointers into the message