Examples of MapRequestMessage


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

Examples of org.jdesktop.wonderland.modules.sharedstate.common.messages.MapRequestMessage

     * Initialize the map by reading in all the keys. This method blocks
     * until the server has sent us the keys for this map.
     */
    private void doInit() {
        try {
            ResponseMessage rm = channel.sendAndWait(new MapRequestMessage(getName()));
            if (rm instanceof MapResponseMessage) {
                MapResponseMessage mrm = (MapResponseMessage) rm;
                backing.initialize(mrm.getVersion(), mrm.getKeys());
            } else {
                throw new IllegalStateException("Bad response to map request: " +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.