writeDatagrams(_:sentBy:completionHandler:)
Write datagrams to the flow.
Declaration
func writeDatagrams(_ datagrams: [Data], sentBy remoteEndpoints: [NWEndpoint], completionHandler: @escaping @Sendable ((any Error)?) -> Void)func writeDatagrams(_ datagrams: [Data], sentBy remoteEndpoints: [NWEndpoint]) async throwsParameters
- datagrams:
An array of Nsdata objects containing datagram payloads to be written.
- remoteEndpoints:
An array of Nwendpoint objects containing the source endpoints of the datagram payloads in
datagrams. - completionHandler:
A block that will be executed by the system on an internal system thread when the data is written into the receive buffer of the socket associated with the flow. If an error occurs while writing the data then a non-nil Nserror object is passed to the block. See
NEAppProxyFlowErrorin Neappproxyflow for a list of possible errors.