Instance Method


Write datagrams to the flow.


func writeDatagrams(_ datagrams: [Data], sentBy remoteEndpoints: [NWEndpoint], completionHandler: @escaping (Error?) -> Void)



An array of NSData objects containing datagram payloads to be written.


An array of NWEndpoint objects containing the source endpoints of the datagram payloads in datagrams.


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 NEAppProxyFlowError in NEAppProxyFlow for a list of possible errors.

See Also

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software