Network Data Provider - handleXxxboundDataCompleteForFlow()

Hi,


1. What does Complete means for methods handleOutboundDataCompleteForFlow() and handleInboundDataCompleteForFlow() ?

When is it completed? After an amount of bytes? After a packet (size?) is captured? After a timeout? After the socket is closed?


2. Do I need to do/return something special in handleNewFlow() to get these methods called?


3. Why is this not well explained in the API documentation? (https://developer.apple.com/documentation/networkextension/nefilterdataprovider,https://developer.apple.com/documentation/networkextension/nefilterdataprovider/1618977-handleinbounddatacompletehttps://developer.apple.com/documentation/networkextension/nefilterdataprovider)


Thanks.

Regards.

Replies

+1. Need answers to these questions and I would like to add two more questions.


4. Can we pause and resume with the verdict for these callbacks? While trying this, extension got crashed stating the following reason.

Application Specific Information:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot resume a flow that is not paused'

terminating with uncaught exception of type NSException

abort() called


5. What is the safest way to call resume function to avoid such crashes? Is there an API available to check the state of the flow?