Package net.tomp2p.connection

Examples of net.tomp2p.connection.ChannelServerConfiguration


      DefaultEventExecutorGroup eventExecutorGroup = new DefaultEventExecutorGroup(250);
      ChannelClientConfiguration ccc1 = PeerBuilder.createDefaultChannelClientConfiguration();
      ccc1.pipelineFilter(new PeerBuilder.EventExecutorGroupFilter(eventExecutorGroup));

      ChannelServerConfiguration ccs1 = PeerBuilder.createDefaultChannelServerConfiguration();
      ccs1.pipelineFilter(new PeerBuilder.EventExecutorGroupFilter(eventExecutorGroup));

      master = new PeerBuilderDHT(new PeerBuilder(new Number160(rnd)).ports(4001).channelClientConfiguration(ccc1)
              .channelServerConfiguration(ccs1).start()).start();
      slave = new PeerBuilderDHT(new PeerBuilder(new Number160(rnd)).ports(4002).channelClientConfiguration(ccc1)
              .channelServerConfiguration(ccs1).start()).start();
View Full Code Here


    SignatureCodec codec = new RSASignatureCodec();

    // replace default signature factories
    ChannelClientConfiguration clientConfig = PeerBuilder.createDefaultChannelClientConfiguration();
    clientConfig.signatureFactory(factory);
    ChannelServerConfiguration serverConfig = PeerBuilder.createDefaultChannelServerConfiguration();
    serverConfig.signatureFactory(factory);

    KeyPair keyPairPeer1 = gen.generateKeyPair();
    p1 = new PeerBuilderDHT(new PeerBuilder(Number160.createHash(1)).ports(4834).keyPair(keyPairPeer1)
            .channelClientConfiguration(clientConfig)
            .channelServerConfiguration(serverConfig).start()).start();
View Full Code Here

TOP

Related Classes of net.tomp2p.connection.ChannelServerConfiguration

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.