handleInboundData(from:readBytesStartOffset:readBytes:)
Make a filtering decision about a chunk of inbound data.
Declaration
func handleInboundData(from flow: NEFilterFlow, readBytesStartOffset offset: Int, readBytes: Data) -> NEFilterDataVerdictParameters
- flow:
An Nefilterflow object containing information about the flow.
- offset:
An unsigned integer containing the offset of the data stored in
readBytes. This offset is measured from the beginning of the flow’s inbound data. - readBytes:
An Nsdata object containing the data to filter. For non-UDP/TCP flows, since the data may optionally include the IP header,
readBytesincludes a 4-byte Nefilterdataattribute field preceding the user data. Your handler must examine the Nefilterdataattribute field and handle the data accordingly.
Return Value
A NEFilterDataVerdict object indicating how the system should handle the chunk of data and all subsequent inbound data for the flow.
Discussion
NEFilterDataProvider subclasses must override this method.