From 5652dedd76007a0788446f2d86b06b044ef63ba1 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Sun, 9 Oct 2022 15:21:09 +0200 Subject: [PATCH] fixup! feat: add example for sendMulticast method --- example/get_resource_multicast.dart | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/example/get_resource_multicast.dart b/example/get_resource_multicast.dart index 27497846..d259b1ac 100644 --- a/example/get_resource_multicast.dart +++ b/example/get_resource_multicast.dart @@ -15,19 +15,16 @@ import 'dart:async'; import 'package:coap/coap.dart'; -import 'config/coap_config.dart'; FutureOr main() async { - final conf = CoapConfig(); final uri = Uri( scheme: 'coap', - host: CoapDefinedAddress.allCOAPNodesLinkLocalIPV6, - port: conf.defaultPort, + host: CoapDefinedAddress.allNodesIPV6, ); - final client = CoapClient(uri, conf); + final client = CoapClient(uri); try { - final request = CoapRequest.newGet()..uriPath = './well-known/core'; + final request = CoapRequest.newGet()..uriPath = '/.well-known/core'; await for (final response in client.sendMulticast(request)) { print(response.payloadString);