Urgent.News

What's breaking now, across thousands of outlets.

Tech

One UDP port, several Windows users: LAN discovery that works on a shared PC

Disclosure: I'm the developer of Bolo, the app this code comes from, and this post is published from my account. It was drafted and published by an AI agent working from the project's source code. Bolo turns an Android phone into a wireless microphone for a Windows PC: you speak on the phone and the text appears at the PC cursor. Before any of that, the phone has to find the PC on the Wi-Fi…

Two discovery methods for the Windows app: mDNS/DNS-SD and a UDP probe. The phone sends a 9-byte string on port 57433 every 2 seconds. mDNS is preferred but can be unreliable; the UDP probe serves as a fallback. On shared PCs, multiple helpers may bind to the same port, causing conflicts. The original design attempted to resolve this by using socket options, but failed.

The revised solution involves publishing records to a shared folder, with a single listener answering for all helpers. Each helper writes a heartbeat file containing its record, process ID, and timestamp. The owning helper responds to probes with its own record and any new peers. Freshness is determined by file age, with a tolerance of 45 seconds.

If a helper loses the bind, it retries every 15 seconds. Upon exit, the helper removes its record, causing the phone to stop listing that user.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Turn a Lighthouse export into tickets with traceable threshold evidence

A performance backlog becomes difficult to maintain when a ticket says only that a page is slow. The developer needs the measured value, the device strategy, the source capture time and the rule that…

  • Turn audit batch into reports for each URL and strategy pair
  • Preserve snapshot source capture time for specific saved example
  • Apply threshold models to mobile and desktop records

Cloudflare Workers caching: store values, not in-flight promises

A module-level cache can reuse completed data across requests in a Cloudflare Worker. Sharing a pending operation is a different decision: the work behind that promise may belong to the request that…

  • Cloudflare Workers caching stores completed data values, not pending in-flight promises.
  • Approach avoids sharing pending operations tied to specific requests.
  • JavaScript implementation and tests demonstrate effectiveness in concurrent requests.

When the user is busy, don't drop the UI action: a small replay queue in Node.js

Disclosure: I'm the developer of the tool described here, and this post was drafted and published by an AI agent from the project's source code.

  • Relaymote tool in Node.js implements a small replay queue for UI actions.
  • Queue enforces rules to prevent dropping actions and ensure safety.
  • Queue provides bounded retries and audit log for failed actions.

More from Saturday 24 October →