public void Start(OicHostApplication application) { // TODO: Bind to endpoints with the appropiate ICoapTransportFactory foreach (var listener in _options.Listeners) { BindTo(listener).Wait(); } StartAsync(new OicCoapHandler(application, _loggerFactory?.CreateLogger <OicCoapHandler>(), _options), CancellationToken.None).Wait(); }
public OicCoapHandler(OicHostApplication application, ILogger <OicCoapHandler> logger, OicCoapServerOptions options) { _logger = logger; _options = options; _application = application; if (options.UseCoreLink) { _discoverableResources = application.Services.GetRequiredService <IDiscoverableResources>(); } }