Package net.tomp2p.natpmp

Examples of net.tomp2p.natpmp.MapRequestMessage


   */
  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);
    pmpDevice.enqueueMessage(mapUDP);
    pmpDevice.waitUntilQueueEmpty();
    // UDP is nice to have, but we need TCP
View Full Code Here

TOP

Related Classes of net.tomp2p.natpmp.MapRequestMessage

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.