Commit 08690603 authored by Bjoern Konieczek's avatar Bjoern Konieczek
Browse files

Add All-CoAP-Nodes IP Multicast addresses to constants; add extended connect()...

Add All-CoAP-Nodes IP Multicast addresses to constants; add extended connect() function to BasiCoAPCLient
parent ab6e037a
......@@ -56,6 +56,12 @@ public class BasicCoapClient implements CoapClient {
return true;
}
public boolean connect( String server_addr, int port ){
this.SERVER_ADDRESS = server_addr;
this.PORT = port;
return this.connect();
}
public CoapRequest createRequest( boolean reliable, CoapRequestCode reqCode ) {
return clientChannel.createRequest( reliable, reqCode );
......
......@@ -54,6 +54,21 @@ public final class Constants {
* See rfc7252 - 6.1. "coap URI Scheme" for further details.
*/
public final static int COAP_DEFAULT_PORT = 5683;
/**
* The all CoAP nodes IPv4 multicast address.
*/
public final static String COAP_ALL_NODES_IPV4_MC_ADDR = "224.0.1.187";
/**
* The all CoAP nodes link-local IPv6 multicast address.
*/
public final static String COAP_ALL_NODES_IPV6_LL_MC_ADDR = "ff02::fd";
/**
* The all CoAP nodes site-local IPv6 multicast address.
*/
public final static String COAP_ALL_NODES_IPV6_SL_MC_ADDR = "ff05::fd";
/**
* This is the default value (in seconds) for the Max-Age Option. <br>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment