Sent bytes and receive bytes

Hi all.
I want to write a program to retrieve sent bytes and recieve bytes for each process like tab network activity in resource monitor.
Someone can tell me how I can do that.
Thank all.
Topic archived. No new replies allowed.