NEAppProxyTCPFlow - Detect connection close

From the documentation, when the NEAppProxyTCPFlow.readData returned data with length 0, no more can be subsequently read from the flow. In this situation, can I assume the flow is closed and proceed to close the flow? Or should I wait for more data coming in to handle NEAppProxyTCPFlow.write?
One approach to this would be to use NWConnection on the remote side of the proxy and when a flag for isComplete is send on the receive method, then it would be time to tear down the remote connection and the NEAppProxyTCPFlow side as well.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
NEAppProxyTCPFlow - Detect connection close
 
 
Q