getAddressString method
Implementation
String? getAddressString() {
if (addressType == SOCKSAddressType.Domain) {
return const AsciiDecoder().convert(address);
} else if (addressType == SOCKSAddressType.IPv4) {
return address.join(".");
} else if (addressType == SOCKSAddressType.IPv6) {
var ret = <String>[];
for (var x = 0; x < address.length; x += 2) {
ret.add(
"${address[x].toRadixString(16).padLeft(2, "0")}${address[x + 1].toRadixString(16).padLeft(2, "0")}");
}
return ret.join(":");
}
return null;
}