Package net.tomp2p.p2p

Examples of net.tomp2p.p2p.Peer.peerBean()


            for (int i = 0; i < pa.length; i++) {
                sender.peerBean().peerMap().peerFound(pa[i], null, null);
            }
            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            recv1 = new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start();
            NeighborRPC neighbors2 = new NeighborRPC(recv1.peerBean(), recv1.connectionBean());
          
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();
View Full Code Here


            for (int i = 0; i < pa.length; i++) {
                sender.peerBean().peerMap().peerFound(pa[i], null, null);
            }
            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            recv1 = new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start();
            NeighborRPC neighbors2 = new NeighborRPC(recv1.peerBean(), recv1.connectionBean());
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);

            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();
View Full Code Here

        Peer recv1 = null;
        try {
            sender = new PeerBuilder(new Number160("0x50")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start();
            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            NeighborRPC neighbors2 = new NeighborRPC(recv1.peerBean(), recv1.connectionBean());

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();
View Full Code Here

        Peer recv1 = null;
        try {
            sender = new PeerBuilder(new Number160("0x50")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start();
            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            NeighborRPC neighbors2 = new NeighborRPC(recv1.peerBean(), recv1.connectionBean());

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();
View Full Code Here

        ChannelCreator cc = null;
        try {
            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean());
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean());
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingUDP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
View Full Code Here

        try {
            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean(), false, true,
                    false);
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, false);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
View Full Code Here

        try {
            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean(), false, true,
                    true);
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, true);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
View Full Code Here

            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, true);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
            System.err.println("done:" + fr.failedReason());
            Assert.assertEquals(true, fr.failedReason().contains("/ timeout"));
View Full Code Here

        try {
            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean(), false, true,
                    false);
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, false);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingUDP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
View Full Code Here

            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, false);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingUDP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
        } finally {
            if (cc != null) {
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.