Package net.tomp2p.connection

Examples of net.tomp2p.connection.Ports.tcpPort()


                                // now we know our internal IP, where we receive
                                // packets
                                final Ports ports = peer.connectionBean().channelServer().channelServerConfiguration().portsForwarding();
                                if (ports.isManualPort()) {
                                  final PeerAddress serverAddressOrig = serverAddress;
                                    serverAddress = serverAddress.changePorts(ports.tcpPort(),
                                            ports.udpPort());
                                    serverAddress = serverAddress.changeAddress(seenAs.inetAddress());
                                    //manual port forwarding detected, set flag
                                    serverAddress = serverAddress.changePortForwarding(true);
                                    peer.peerBean().serverPeerAddress(serverAddress);
View Full Code Here


          Ports externalPorts = setupPortforwarding(future.internalAddress().getHostAddress(), peer
              .connectionBean().channelServer().channelServerConfiguration().portsForwarding());
          if (externalPorts != null) {
            final PeerAddress serverAddressOrig = peer.peerBean().serverPeerAddress();
            final PeerAddress serverAddress = serverAddressOrig
                .changePorts(externalPorts.tcpPort(), externalPorts.udpPort())
                .changeAddress(future.externalAddress());
           
            //set the new address regardless wheter it will succeed or not.
            // The discover will eventually check wheter the announced ip matches the one that it sees.
            peer.peerBean().serverPeerAddress(serverAddress);
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.