readDatagrams(completionHandler:)
Read datagrams from the flow.
Declaration
func readDatagrams(completionHandler: @escaping ([Data]?, [NWEndpoint]?, (any Error)?) -> Void)Parameters
- completionHandler:
A block that will be executed by the system on an internal system thread when datagrams have been read from the flow. The block takes the datagrams that were read, the destination endpoints of the datagrams, and an Nserror. If an error occurred while reading then
errorwill be non-nil. SeeNEAppProxyFlowErrorin Neappproxyflow for a list of possible error codes. If thedatagramsandremoteEndpointsarrays are non-nil but are empty, then no more datagrams can be subsequently read from the flow.