collect
TypeScriptcollect(queue: _Dispatch_DispatchQueue, completion: ((arg0: NWConnection_DataTransferReport) => void)): voidSwift declaration@preconcurrency func collect(queue: DispatchQueue, completion: @escaping @Sendable (NWConnection.DataTransferReport) -> Void)Request collection of values in a DataTransferReport, effectively ending the outstanding report begun with startDataTransferReport(). Once the report has been collected, the completion handler will be invoked exactly once on the provided DispatchQueue.