extractResponseOrigin static method

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

Extracts the RESPONSE-ORIGIN attribute from a STUN message

Implementation

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