subscribe(to:)

Returns a ServiceSnapshots, which is an AsyncSequence and each of its items is a snapshot listing of service instances.

ServiceDiscovery+AsyncAwait.swift:45
iOS
15+
macOS
12+
tvOS
15+
watchOS
8+
func subscribe(to service: Service) -> ServiceSnapshots<Instance>

Parameters

service

The service to subscribe to

Returns

A ServiceSnapshots async sequence.