Is it somehow possible to get the transport layer (UDP and TCP) payload amounts for TLS or QUIC connections established via the Network framework? (From within the app itself that establishes the connections.)
I am currently using the ntstat.h kernel socket calls, but I hope there is a simpler solution.
With ntstat, I have not yet been able to observe a specific connection. I have to search for the connection I am looking in all (userspace) connections.
The droid you’re looking for here is the startDataTransferReport() method. It ultimately delivers a NWConnection.DataTransferReport structure, which includes statistics for each individual path and aggregated across all paths used by the connection.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"