Read past feeds

I know there is a way to read bandwitch.

+3
source share
1 answer

There is no documented way to do this in the iPhone SDK. I'm sure they use sysctl (), which is a standard BSD call, so it should also be present on iPhone OSX.

See this answer: How to get network adapter statistics on Linux / Mac OSX?

The good question is how did they go through the Appstore procedure. I think sysctl () is about halfway from the documented to the undocumented API: it is not mentioned in the SDK documentation, but it is present in all BSD systems. Thus, it is possible that Apple is not filtering (or not filtering) standard BSD calls, and therefore they pass sysctl () through.

The UPDATE . I successfully executed this netstat code on iPhone Simulator (I don't have an iPhone device right now). All I had to do was comment #include <net/route.h>because it is not in the iPhone SDK and copy the following definition from this header:

#define RTM_IFINFO2 0x12

, . , SDK, , Apple , ( ...).

+1

Source: https://habr.com/ru/post/1747472/


All Articles