extractOtherAddress static method

({InternetAddress address, int port})? extractOtherAddress(
  1. StunMessage message
)

Extracts the OTHER-ADDRESS attribute from a STUN message

Implementation

static ({InternetAddress address, int port})? extractOtherAddress(StunMessage message) {
  final otherAddress = message.attributes[StunAttribute.otherAddress];
  if (otherAddress != null) {
    return decodeAddress(otherAddress);
  }
  return null;
}