Apps to talk across network? Like a private chat?

I have a program that has to keep track of how many files are in certain folders, and when certain users are logged into their machine. I currently have an app that can read the number of folder items easily, and it writes out a single text file about the user’s status to a fixed server location. It seems crude and usually works OK, but reading a text file is sometimes messy and requires the server always be mounted and the text files never be changed or renamed.

So is there a better way to have the apps talk to each other? Can they directly talk to all other users running the app? Sort of like a chat-room functionality. I have about 10 users that would not need to text chat, the app just sends a message about whether user 1 is busy or idle or away from desk etc, sends it out to all other copies of the app running on our internal network.

If it’s cocoa/obj-c that’s OK but give me some example or where to look, I’m learning some of that now so I understand if when I read it (mostly):/.
TIA, Chris