ZMsgServer is a Java-based LAN messaging software that enables peer-to-peer communication.
Unfortunately, there is no comprehensive documentation available online yet. To help with this, below is a quick summary of how ZMsgServer operates. Each device on the LAN runs its own server instance that listens on port 7999. In case you encounter another service on your network using this port, the source port can be changed to free up 7999. The GUI will allow users to change the port in a future update.
When a host wants to send a message, it uses the next available port to broadcast the message. The recipient device receives this message through port 7999. The messages are sent using an ObjectOutputStream and encapsulated within the ZMessage class, a container holding four strings. These messages are then broken down and displayed on the GUI for the target device's user to read.
Better documentation will be available online soon. In the meantime, I recommend downloading the source code itself as the basis for your understanding. With ZMsgServer, saying hello over the LAN has never been so simple or swift.