Class PortmapAlert

java.lang.Object
com.frostwire.jlibtorrent.alerts.AbstractAlert<portmap_alert>
com.frostwire.jlibtorrent.alerts.PortmapAlert
All Implemented Interfaces:
Alert<portmap_alert>

public final class PortmapAlert extends AbstractAlert<portmap_alert>
This alert is generated when a NAT router was successfully found and a port was successfully mapped on it. On a NAT:ed network with a NAT-PMP capable router, this is typically generated once when mapping the TCP port and, if DHT is enabled, when the UDP port is mapped.
  • Method Details

    • mapping

      public int mapping()
      refers to the mapping index of the port map that failed, i.e. the index returned from add_mapping().
      Returns:
      the mapping index
    • externalPort

      public int externalPort()
      the external port allocated for the mapping.
      Returns:
      the external port
    • mapTransport

      public PortmapTransport mapTransport()
    • mapProtocol

      public PortmapProtocol mapProtocol()
      The protocol this mapping was for.
      Returns:
      the mapping protocol