AirDrop Anywhere – Making it work on Windows

# · ✸ 95 · 💬 31 · 2 years ago · bakedbean.org.uk · g3rv4 · 📷
<summary> /// Determines whether the peer wants to receive files from a sender. Not very useful! Now it notifies the peer of each file that was extracted and exposes that file to the peer via HTTPS to allow it to download it. Announcing with a 0s TTL causes downstream mDNS caches to discard the records associated with the peer, making it disappear from any AirDrop browsers. We've discussed how peering is intended to work, so let's dive into the implementation details for peering using SignalR. Out of the box SignalR provides connectivity via Websockets with fallback to server-sent events or long polling, but it abstracts it all away using the concept of a "Hub". Once the archive is extracted we notify the client of each file that was extracted and its corresponding URL on the server - once the client has successfully downloaded all the files it needs then those files are removed from the server. Once connected the server will announce the peer over mDNS.AirDrop will discover the peer via this announcement and call the /Discover API over HTTPS...Wait for a CanAcceptFileRequestMessage from the server. Either way, return the response as a CanAcceptFileResponseMessage so the server knows to how to continue...For each file, receive a FileUploadedRequestMessage and use the URL within it to download the file from the server.
AirDrop Anywhere – Making it work on Windows



Send Feedback | WebAssembly Version (beta)