Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Per-Process Network Monitor in Obj-C?

I want to write a program that monitors packets in and packets out, or in other words, network statistics. Is there any useful class in cocoa? I know there are some existed tools, but it will be a sub-routine of my program. So I must implement on my own.

Thanks a lot!

P.S. I only want to calculate one program / process 's statistics rather than the whole system.

like image 250
Frost Avatar asked Jun 11 '10 21:06

Frost


1 Answers

You won't find much in Cocoa, you'll probably have to delve deeper into Core stuff. In the recently released pool of WWDC videos, they have a video on Core OS Networking that covers the Mac and iPhone platforms both, and gives a pretty good overview of some of the classes you might be needing to look at.

Might not hurt to give the Core Networking stuff a glance, since whatever you're monitoring is most likely using it: http://developer.apple.com/mac/library/documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html

like image 68
peelman Avatar answered Nov 07 '22 21:11

peelman