Skip to content

Year of Code 2025: October Project – Multi-Platform Communication

For October’s Xojo Year of Code 2025, I built MPACSocket, a tiny, reusable UDPSocket subclass that enables zero-config, local-network presence and chat across platforms. It wraps binding, broadcast, presence beacons, peer tracking, and JSON parsing into a single class with a clean event-based API. Drop it into Desktop projects and you’ve got instant LAN discovery and messaging.

What this project includes

  • A self-contained UDPSocket subclass (MPACSocket) that handles bind, presence broadcasting, peer pruning, and chat envelopes with versioned JSON (good for further updates to the protocol).
  • Simple API: Start(port), Stop(), Rename(name), SendChat(text). Everything else comes through events like Bound, ChatReceived, PeerOnline/PeerOffline, PeerUpdated, StatusChanged, and SocketError.
  • A sample DesktopWindow (wndMPAC) that wires MPACSocket to a transcript area and peers list.

How to use

  • Add MPACSocket to your project, drop it onto a DesktopWindow or instantiate in code.
  • Set DisplayName, call Start(62636), and listen to events to update your UI or console output.
  • Use SendChat to broadcast a message; presence beacons and peer tracking happen automatically.

Download

You can download the entire Xojo project from GitHub

This project shows how a small, well-scoped class can turn low-level UDP into a friendly, cross-platform building block. Feel free to adapt the events or JSON schema for your own protocols.

Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!

Year of Code Project

How to Play:

Each month we’ll announce a new theme and share an example project of our own. Share your projects to the Xojo Forum thread for that month via GitHub (all the links you need are posted above ↑ ). Learn how to use Xojo and GitHub.

The Prizes:

Monthly winners get $100 at the Xojo store. Every month you submit a project is another chance to win the grand prize. The grand prize is $250 cash plus a Xojo Pro license and a year of GraffitiSuite and will be announce in December. Learn more about the prizes.