From 1f4f930d1b97bd9ea60144a17a30785bd551cc19 Mon Sep 17 00:00:00 2001 From: Ziran Sun Date: Tue, 14 Feb 2017 14:31:03 +0000 Subject: [PATCH] Document ZoneID for IPv6 host address in OCPlatform::constructResourceObject. Bug: https://jira.iotivity.org/browse/IOT-1758 Change-Id: I0b080f4f97748b5435d5594b45b0634efc42ad2f Signed-off-by: Ziran Sun Reviewed-on: https://gerrit.iotivity.org/gerrit/17269 Tested-by: jenkins-iotivity Reviewed-by: Jihun Ha --- .../src/main/java/org/iotivity/base/OcPlatform.java | 7 +++++-- resource/include/OCPlatform.h | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/java/iotivity-android/src/main/java/org/iotivity/base/OcPlatform.java b/java/iotivity-android/src/main/java/org/iotivity/base/OcPlatform.java index 9eccc63..2b604a2 100644 --- a/java/iotivity-android/src/main/java/org/iotivity/base/OcPlatform.java +++ b/java/iotivity-android/src/main/java/org/iotivity/base/OcPlatform.java @@ -987,8 +987,11 @@ public final class OcPlatform { * Additionally, you can only create this object if OcPlatform was initialized to be a Client * or Client/Server. * - * @param host a string containing a resolvable host address of the server holding - * the resource + * @param host a string containing a resolvable host address of the server + * holding the resource. Currently this should be in the format of + * coap://address:port for IPv4 and in the format of + * coap://[address%25ZoneID]:port for IPv6. In the future, + * we expect "coap:" section is removed from this format. * @param uri the rest of the resource's URI that will permit messages to be * properly routed. * Example: /a/light diff --git a/resource/include/OCPlatform.h b/resource/include/OCPlatform.h index f934227..e4c2b0e 100644 --- a/resource/include/OCPlatform.h +++ b/resource/include/OCPlatform.h @@ -618,9 +618,10 @@ namespace OC * shared ptr. * * @param host a string containing a resolvable host address of the server - * holding the resource. Currently this should be in the format - * coap://address:port, though in the future, we expect this to - * change to //address:port + * holding the resource. Currently this should be in the format of + * coap://address:port for IPv4 and in the format of + * coap://[address%25ZoneID]:port for IPv6. In the future, we expect + * "coap:" section is removed from this format. * * @param uri the rest of the resource's URI that will permit messages to be * properly routed. Example: /a/light -- 2.7.4