Instance Method

handleNewFlow(_:)

Handles a new flow of DNS traffic.

Declaration

func handleNewFlow(_ flow: NEAppProxyFlow) -> Bool

Parameters

flow

The flow representing the DNS traffic that the proxy should handle.

Return Value

A Boolean value set to true if the proxy implementation decides to handle the flow, or false if it instead decides to terminate the flow.

Discussion

The system calls this method to deliver a new network data flow to the proxy provider implementation. Subclasses must override this method to perform whatever steps are necessary to ready the proxy to receive data from the flow.

The proxy provider indicates that the proxy is ready to handle flow data by calling the flow's open(withLocalEndpoint:completionHandler:) method.

If the proxy implementation decides to handle the flow, it is responsible for retaining a reference to the flow instance.