Instance Method

readDatagramsWithCompletionHandler:

Read datagrams from the flow.

Declaration

- (void)readDatagramsWithCompletionHandler:(void (^)(NSArray<NSData *> *datagrams, NSArray<NWEndpoint *> *remoteEndpoints, NSError *error))completionHandler;

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 error will be non-nil. See NEAppProxyFlowError in NEAppProxyFlow for a list of possible error codes. If the datagrams and remoteEndpoints arrays are non-nil but are empty, then no more datagrams can be subsequently read from the flow.

See Also

Handling Flow Data

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