From 6dec8d67b0ef666ade08fd459f2bd5df07c3d716 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Mon, 18 Mar 2024 18:15:06 +0100 Subject: [PATCH] fixup! feat: add initial NDN binding implementation --- example/ndn/client_example.dart | 14 ++++++++++++++ lib/src/binding_ndn/ndn_consumer_factory.dart | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 example/ndn/client_example.dart diff --git a/example/ndn/client_example.dart b/example/ndn/client_example.dart new file mode 100644 index 00000000..bee5fd74 --- /dev/null +++ b/example/ndn/client_example.dart @@ -0,0 +1,14 @@ +// Copyright 2024 Contributors to the Eclipse Foundation. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// +// SPDX-License-Identifier: BSD-3-Clause + +// ignore_for_file: avoid_print + +import "package:dart_wot/binding_ndn.dart"; +import "package:dart_wot/core.dart"; + +Future main() async { + final servient = Servient(clientFactories: [NdnClientFactory(ndnConfig)]); +} diff --git a/lib/src/binding_ndn/ndn_consumer_factory.dart b/lib/src/binding_ndn/ndn_consumer_factory.dart index f3d8058a..751943ec 100644 --- a/lib/src/binding_ndn/ndn_consumer_factory.dart +++ b/lib/src/binding_ndn/ndn_consumer_factory.dart @@ -9,8 +9,8 @@ import "ndn_config.dart"; import "ndn_consumer.dart"; /// A [ProtocolClientFactory] that produces -class NdnConsumerFactory implements ProtocolClientFactory { - NdnConsumerFactory(this.ndnConfig); +class NdnClientFactory implements ProtocolClientFactory { + NdnClientFactory(this.ndnConfig); /// The [NdnConfig] acting as the blueprint for creating final NdnConfig ndnConfig;