Package org.ardverk.dht.message

Examples of org.ardverk.dht.message.PingRequest


    }
 
    @Override
    public void ping() throws IOException {
      MessageFactory factory = getMessageFactory();
      PingRequest request = factory.createPingRequest(address);
     
      long timeout = config.getPingTimeout(TimeUnit.MILLISECONDS);
      send(contactId, request, timeout, TimeUnit.MILLISECONDS);
    }
View Full Code Here


    }
   
    @Override
    public void ping() throws IOException {
      MessageFactory factory = getMessageFactory();
      PingRequest request = factory.createPingRequest(contact);
     
      long timeout = config.getPingTimeoutInMillis();
      long adaptiveTimeout = config.getAdaptiveTimeout(
          contact, timeout, TimeUnit.MILLISECONDS);
      send(contact, request, adaptiveTimeout, TimeUnit.MILLISECONDS);
View Full Code Here

    Contact contact = new DefaultContact(Type.SOLICITED,
        contactId, 0, false,
        new InetSocketAddress("localhost", 6666));
   
    SocketAddress address = new InetSocketAddress("localhost", 6666);
    PingRequest request = new DefaultPingRequest(messageId, contact, address);
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    Encoder encoder = codec.createEncoder(baos);
    encoder.write(request);
    encoder.close();
View Full Code Here

TOP

Related Classes of org.ardverk.dht.message.PingRequest

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.