commands to create a MESSENGER in LAN

hello,
I want to write a messenger program among the fedora systems in my college LAN.I feel "write","chat","talk" are the commands.But I am not able to get it write.can you please advice me on this messenger topic.Can you give me an example about how to use these write,talk,chat commands.Please give me a small example if possible !!!!

write(1): send message to another user - Linux man page

try this example
write a message to login users through terminal Linux by Examples
"
You can broadcast your message to all login user with wall command. wall, write to all.
cat announcement.txt | wall
"

Darius

UUOC

wall < announcement.txt