getAvailableUpgrades method

List getAvailableUpgrades()

Get available upgrades for this socket.

Implementation

List<dynamic> getAvailableUpgrades() {
  var availableUpgrades = [];
  var allUpgrades = server.upgrades(transport.name!);
  for (var i = 0, l = allUpgrades.length; i < l; ++i) {
    var upg = allUpgrades[i];
    if (server.transports.contains(upg)) {
      availableUpgrades.add(upg);
    }
  }
  return availableUpgrades;
}