I'm trying to monitor the network sessions on server withe event driven programming (and not polling on /proc/net/tcp
or udp
).
I was able to find this article but it only provide one time look at the current state and not an event on each change (LISTEN, ESTABLISHED...).
Is it possible to use this like in this article that monitors processes changes but on network connections?
If not, is there any other API that I can use in order to achive this without polling /porc/net/*
in interval?