Package ch.ethz.inf.vs.californium.coap

Examples of ch.ethz.inf.vs.californium.coap.Request.send()


      // create new request
      Request request = Request.newGet();
      // specify URI of target endpoint
      request.setURI(uri);
     
      request.send();
     
      // receive response
      try {
        Response response = request.waitForResponse(1000);
       
View Full Code Here


   */
  public static void selfTest() {
    try {
      Request request = Request.newGet();
      request.setURI("localhost:5683/benchmark");
      request.send();
      Response response = request.waitForResponse(1000);
      System.out.println("received "+response);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

   */
  public static void selfTest() {
    try {
      Request request = Request.newGet();
      request.setURI("localhost:5683/hello");
      request.send();
      Response response = request.waitForResponse(1000);
      System.out.println("received "+response);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

      // execute the request
      LOGGER.finer("Sending coap request.");
//      outgoingRequest.execute();
      LOGGER.info("ProxyCoapClient received CoAP request and sends a copy to CoAP target");
      outgoingRequest.send();

      // accept the request sending a separate response to avoid the
      // timeout in the requesting client
      LOGGER.finer("Acknowledge message sent");
    } catch (TranslationException e) {
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.