Package net.tomp2p.natpmp

Examples of net.tomp2p.natpmp.NatPmpDevice


   *             the router does not supports PMP
   */
  public boolean mapPMP(final int internalPortUDP, final int internalPortTCP, final int externalPortUDP,
          final int externalPortTCP) throws NatPmpException {
    InetAddress gateway = Gateway.getIP();
    pmpDevice = new NatPmpDevice(gateway);
    MapRequestMessage mapTCP = new MapRequestMessage(true, internalPortTCP, externalPortTCP, Integer.MAX_VALUE,
            null);
    MapRequestMessage mapUDP = new MapRequestMessage(false, internalPortUDP, externalPortUDP, Integer.MAX_VALUE,
            null);
    pmpDevice.enqueueMessage(mapTCP);
View Full Code Here

TOP

Related Classes of net.tomp2p.natpmp.NatPmpDevice

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.