packetHandler
A Swift closure or an ObjectiveC block that handles each packet received by the filter.
Declaration
var packetHandler: NEFilterPacketHandler? { get set }Discussion
Set this property to a handler that returns a NEFilterPacketProvider.Verdict for each packet it receives.
Since there may be multiple filtering sources presenting frames to the provider, multiple simultaneous threads may execute this packet handler. Therefore, the packet handler must be able to handle execution in a multi-threaded environment.