Skip to main content

AirShare: Cross-Platform, Infrastructure-Free Peer-to-Peer File Transfer and Real-Time Communication

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

AirShare: Cross-Platform, Infrastructure-Free Peer-to-Peer File

Transfer and Real-Time Communication System Using UDP Broadcast Discovery and TCP Streaming Over Local Area Networks

1 Computer Engineering Department, Vishwakarma Institute of Technology, Bibwewadi, Pune, India |

2 Computer Engineering Department, Vishwakarma Institute of Technology, Bibwewadi, Pune, India |

3 Computer Engineering Department, Vishwakarma Institute of Technology, Bibwewadi, Pune, India |

Abstract - AirShare is a peer-to-peer cross-platform file transfer and real-time communication network implementedusingDartandFlutter,andonlyactive within local area networks, without the need of an internet connection, cloud service or paired device relationships. The system uses a hybrid discovery architecture of UDP broadcastbeacons(port8888)coupledwithMulticast DNS (mDNS) service registration, length-prefixed TCP streaming protocol with SHA-256 integrity checking (port 8889)and64KBchunkedpayloadstotransfer information in a memory-efficient way. The other subsystems offer WebSocket based real-time chat, multi- device room sessions (of 6 digits), cross-device clipboard syncing and a HiveNoSQLdatastore.Experimentaltestingofafour-node Wi-Fi 6 LAN shows that the maximum throughput is over 85MB/sandthelatencyofdevicesdiscoverytakes nomore than three seconds, which confirms AirShare as a serverless, privacy-driven local communications platform. Keywords - peer-to-peernetworking,localareanetwork, UDP broadcast, mDNS, TCP streaming, Flutter, SHA-256 integrity, WebSocket, zero-configuration networking, embeddedNoSQL.

I. INTRODUCTION

The widespread growth of heterogeneous computing devices in both business and home networks have generated a consistent need of fast, dependable and confidentialfiletransferwithinanintra-networkwithout relying on cloud computing infrastructure. Traditional options like Google Drive and Microsoft OneDrive all trafficalltheirdatatoremoteservers,introducingWANlinkdelays,data-sovereignty,andcomplianceoverheads in the GDPR and CCPA. Apple AirDrop, a platform proprietarytool,usesBluetoothLEtocommunicatewith a discovery step and Wi-Fi Direct to transfer data, but only operates with homogeneous Apple environments andisopen-source. There is no available open-source application bringing together automatic peer discovery, high-throughput

binary file transfer, real-time messaging, multi-device sessionmanagement,andclipboardsynchronizationinthe sameapplication,whichbehavessimilarlyunderAndroid, iOS,Windows,macOSandLinux.AirSharefillsthisgapby a completely serverless architecture based on platformneutral Dart and Flutter primitives: UDP broadcast to advertise presence, TCP streaming to transfer binaries reliably,WebSocketchannelstoexchangemessagesfully, mDNStoadvertiseservicesandHivetopersiston-device: sub-three-seconddiscovery,>85MB/sthroughputandno externaldependencies.

II. RELATED WORK / LITERATURE REVIEW

A. P2P Discovery Paradigms

It was shown by Stoica et al. [1] that with Chord DHT, withoutapublicregistry,decentralizedpeerlookupcanbe donewithconstantcost,whichislogNinthesameweight space with a stable hash. Though Chord is an internetscale overlays, the self-organizing behavior of nodes that drives its design is an inspiration behind AirShare in designing a zero-server LAN. Ripeanu et al. [3] demonstrated using Gnutella network crawling that UDP broadcast flooding works well on small-to-medium networks,butgrowsintrafficquadraticallyaboveseveral hundredpeersanddirectlydeterminedthesubnet-scoped discovery limit of AirShare with a 15-second staleness eviction.

B. Zero-Configuration Networking

RFC 6762 (Cheshire and Krochmal) [4] describes mDNS that allows service advertisement via the link-local multicast 224.0.0.251:5353 without DNS infrastructure. RFC 6763 [5] adds DNS-SD organized naming (_service._proto.local)andmetadata(TXTrecords)tothis. AirShare is registered as part of _airshare._tcp.local and has fields such as deviceId, deviceName and protocol stored in TXT records. On networks with access-point client-isolation policies that block 255.255.255.255 broadcasts, such as Wi-Fi 6 routers, this secondary

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

channel bypasses such policies, and recovers about 61 percentofUDPdiscoveryfailures.

2. Hybrid P2P discovery sequence: UDP broadcast primary path with mDNS fallback and manual IP recovery.

C. TCP Binary Streaming, Protocol Framing

TCPhasaspecificationinRFC793[8]anddefinesTCPto be a reliable transport of byte-streams with no defined boundariesofmessages.AirShareusesalength-fixedTLV framing scheme [7] - a 4-byte big-endian header before each logical message through an AirShare SocketReader.readExact(n) helper which blocks until n bytes are buffered has removed partial-read defects of OS- level TCP segmentation. The algorithm (TCP_NODELAY) used by Nagle has been turned off to enablefileblocks64KBtobesentinoneburstandhave thehighest throughputintheone-digit-millisecondRTT regimeof LANnetworks[6].

D. Data Integrity, Persistence, and Messaging SHA-256 (FIPS 180-4) [9] provides a collision and preimage-resistanceagainsta2collisionprobabilityand thusitissuitableincheckingper-fileintegritydespitethe

presenceofadversarialparticipantsinLAN,whichismore than CRC-32, which is prone to crafted collisions. Published Flutter benchmarks show that Hive [10], a compile-time-typed LSM-tree key-value store for Dart, is 3.2timesfasterthanSQLite atsequentialwrites,soitis a good fit for append-heavy workloads, especially transfer history workloads and chat logs. WebSocket (RFC 6455) provides full-duplex messaging at 2-10 bytes of framing overheadover200-800bytesperHTTPpollcycleandDart has its websocket_channel package providing a StreamSink/Stream interface that fits the reactive ChangeNotifierstatemodelofAirShare[11].

E. Comparative Positioning

It is appropriate to highlight that Table I compares AirSharetothethreemaintypesoflocalfiletransfertool. The Apple AirDrop supports the range of 40-120 MB/s andisclosedsourceandAppleexclusive.Browserbased Snapdrop/PairDropneedsasignalingserver(exposesto theinternet)STUN/TURN,whichisabreachofthezeroexternal-dependency requirement. Raw TCP transfer (netcat, scp) is provided but does not autodiscover. AirShare isunique becauseofintegratingcross-platform breadth, zero external dependencies and automatic discovery of an entire application all in a single open sourceproject.

TABLE I. Comparative Analysis of Local File Transfer Solutions

irDrop

(Browser)

(STUN/TUR N)

(Proposed)

OS)

(UDP+mDNS)

III. SYSTEM ARCHITECTURE

A. Design Principles

There are five architectural principles in AirShare. (1) Zero External Dependency: the set of external communications is only in the local subnet through UDP

Fig.

International Research

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net

broadcast, TCP unicast, and UDP multicast - there is no entry point to the internet or cloud API, nor a server preset on a server. (2) Cross-Platform Behavioral Uniformity: the same functionality on Android, iOS, Windows,macOSandLinux,withplatformdistinctionsin the form of conditional port assignments (port 8890 on macOStoavoidiOSSimulatorconflicts).(3)Resilienceto

ProgressiveError:everyattempttostartaserviceisput in its own try-catch, with a time limit of 2-3 seconds, so failure in one subsystem does not trigger additional failures. (4) Reactive State Propagation: each service is based on ChangeNotifier and mutations are delivered to subscribing UI components immediately through the Provider consumer mechanism. (5) Stream-Based Transfer Architecture: file transfer is a model of a Dart async generator that produces TransferProgress objects, which facilitates back-pressured, cancellable and observabletransferpipelines.

B. Service Component Overview

Basedonaservice-orientedarchitecture[17],AirShareis partitioned into a set of nine independent services that have different interfaces: (1) NetworkService binds a RawDatagramSocket on UDP port 8888, sends JSON presence beacons after every 3 seconds, has a staleness window of 15 seconds, and removes dead peers after every 10 seconds. (2) TransferService layers TCP port 8889, the length-prefixed framing layer, the 64 KB file chunk streaming and real-time throughput metering streaming layer, and a post-transfer checksum verification pipeline based on SHA-256. (3) FileService provides wrappers around FilePicker and PathProvider toselectmulti-typefilesandfindthedownloaddirectory.

(4) RoomService can be used as a multi-device server, port8891,withsix-digitPIN,anda5-minTTLusingaDart Timer.(5)ChatServicecreatesWebSocketconnectionsto operate in full-duplex peer messaging based on JSONserialized ChatMessage messages and directed via a broadcast StreamController. (6) MDNSDiscoveryService registers and queries PTR/SRV/TXT records using the multicast_dns package under _airshare._tcp.local. (7) ClipboardSyncService is an interval (1-second) poller of the Flutter Clipboard API that transmits changes over a broadcaststreampersisted toHive.(8)DatabaseService encasesthreeHiveboxes(TransferHistory,ChatMessage, Settings) with strongly-typed TypeAdapter CRUD APIs. (9) ThemeService keeps light/dark mode preference in SharedPreferences and informs themeMode in MaterialAppthroughChangeNotifier.

C. Transfer Control Flow

An entire file transfer is executed by an 11-step process. On launching an application, Hive TypeAdapters are registered and storage boxes are opened before any service is launched. HomeScreen.initializeApp() subsequently implements a cascading order of services: DeviceSettingsService applies the saved device name, FileService sets the download directory, TransferService binds the TCP server socket and NetworkService begins UDPheartbeatbroadcasting.Whenatransferisinitiated,a Socket is connected by TransferService to the target deviceonport8889witha30-secondconnectiontimeout. The sender calculates SHA-256 checksums of all the selected files, encodes a length-prefixed JSON metadata frame (transferId, fileCount, totalSize, per-file name/size/MIME/checksum),andwritesittothe socket. The receiver reads the exact length of metadata frame, decodes it and transmits a length-prefixed acceptance acknowledgement. The payloadof filesis then sent in 64 KBchunks;eachchunkupdatesaTransferProgressobject whichisyieldedontheasyncgeneratorstreamtoanimate UIprogressindicatorsonthefly.Atcompletion,thesender sends a TRANSFER_COMPLETE sentinel and closes the socket. At the receiver, file writes are completed, MIME type resolved, a TransferHistory record maintained and transfer status changed to completed. Error paths on either side set TransferProgress to failed, close all open socketsvia the activeSocketsmap, and signal listeners to showerrorintheUI.

IV. IMPLEMENTATION

A. Technology Stack

AirShare supports Flutter and Dart as the only programming language with native compilation to Android (ARM64/ARM32), iOS (ARM64), Windows (x64),macOS(ARM64/x64)andLinux(x64).Allsocket primitives (RawDatagramSocket in UDP and Socket/ServerSocketinTCP)arebasedondart:io,and network behavior is cross-platform with no platform channels. Important dependencies are: multicast_dns to use mDNS, websocket_channel as WebSocket client/server, hive/hive_flutter with hive_generator

Fig. 1. AirShare system architecture: nine service components, inter-service data flows, and network transport layer interfaces.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

fortyped persistence,cryptoforSHA-256,file_picker to select native files, and path_provider to locate directories. Provider 6.x is used in UI layers as a reactive state, flutter_animate for micro-animations, and google_fonts for typography. The pointycastle libraryisdeclaredinpubspec.yamlastheplatformon whichfurtherTLSintegrationwilltakeplace.

B. Data Quality Mitigations

Therearefourruntimesafeguardswhichensurethe correctness of transfers. The custom SocketReader usesagrowablebytebufferandoffersareadExact(n) method which blocks until the entirety of incoming TCP bytes is available, counteracting partial-frame delivery bugs. SHA- 256 checksums are included in the metadata of transfers and are verified on the recipientaftercompletefileassembly to give endto-end integrity assurances. The getUniqueFilePath() routine ensures that an extra suffix is added incrementally (e.g., file_3.txt) to the destinationfilesothattherearenosilentoverwrites. NetworkService.cleanupOldDevices() is called every 10secondsandevictspeerswithlastSeenolderthan 15seconds,keepingthelivelistofdevicesaccurate.

VI. EXPERIMENTAL SETUP

The experiments were run in a four-node testbed connectedtoaTP-LinkAX3000Wi-Fi6routeronthe5 GHz band (theoretical 2402 Mbps) over a 192.168.1.0/24 subnet. Nodes comprised: Node AAndroidPixel7(Snapdragon8Gen2,8GBRAM);Node B-Windows11Desktop(Inteli7-12700K,32GBRAM); NodeC-macOSVentura(AppleM2,16GBRAM);Node D - Ubuntu 22.04 (AMD Ryzen 9 5900X, 64 GB RAM). Five types of payload classes were part of the test dataset:10MBPDF,250MBMP4,1.2GBISO,500MB text archive, 4.7 GB VM image. Five transfers were madeofeachfiletoeachpairofnodesandtheaverages were taken. Load testing on the shared ServerSocket binding was done in parallel (two-session). Latency was measured with Dart wall-clock timestamps recorded at protocol phase boundaries in TransferService debug output; throughput was measured by the time between the transfer-start and TransferStatus.completedevent.

Fig. 3. TCP packet framing structure: 4-byte length header, JSON metadata frame, 64 KB payload chunks, and SHA-256 verification step.

V. HUMAN APPROVAL GATE AND SELF-HEALING

A. Human Approval Gate

At the metadata-validation boundary within TransferService.handleIncomingTransfer(),incoming transferswaituntilauserconfirms.Thedecoded metadata frame(identityofsender,listoffiles,size,MIMEtypes)is exposedtoaconfirmationdialog;onlyuponuserapproval is a length-prefixed acceptance JSON dispatched to the sender.The rejectionpathreturnsstatus:rejectedand an explanatory message, gracefully closing the transfer without leaving open sockets. A corresponding gate in RoomService.handleJoinRequest() presents the host with the new participant's name, device type, and IP before grantingroomaccess.

B. Self-Healing Strategies

AnactiveSocketsMapkeyedbytransferIdtracksoutgoing sockets; cancelTransfer() calls socket.destroy(), releasing the port and eliminating socket leaks. Service startup failures are isolated per-service through separate try/catchblocks-acrashinMDNSDiscoveryServiceleaves UDP discovery, file transfer, and chat running perfectly. WhenRawDatagramSocketbindingfails(e.g.,onbrowsertargeted builds or restricted network interfaces), NetworkService switches into manual-IP mode instead of crashing. RoomService.roomExpiryTimer gives a 30second expiry warning and upon expiry closes the room UDP socket, clears participant state and resumes idle discovery. NetworkService.cleanupOldDevices() runs recurrently, keeping discovery accurate by evicting stale peers.

VI. RESULTS AND DISCUSSION

A. Architectural Overhead and Latency

Table II records the results obtained during latency contribution of each phase of the protocol during 50 transfer trials. Large-file transfers placed the fastest overheadonsynchronousSHA-256checksum computation

International Research

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

blockingthemainDartisolate;250MBpayloadstake210318 ms, or 7.8% of the overall transfer time. The toppriority architectural optimization would be offloading checksumcomputationtoaDartIsolateusingcompute(), since this would not change the transfer protocol but would result in perceived latency reduction. TCP connectionsetupandmetadatanegotiationbothtakeless than 0.2% of overall transfer time, confirming that protocolframingoverheadisinsignificant.

TABLE II. System Latency and Architectural Overhead

Protocol Phase Measured Latency

UDPBroadcast Discovery

mDNSService Registration

B. System Performance and Reliability Measures

Table III summarizes performance indicators at the system level assessed over all transfer trials and messaging sessions. The 2.7% rate of device discovery failure can be attributed to Wi-Fi 6 access points operating in client-isolation mode, which prevents broadcast forwarding between client stations at 255.255.255.255-aknownlimitationofbroadcast-based discoverywithmodernWi-Fi6accesspoints.ThemDNS secondary channel, which bypasses broadcast suppressionviathelink-localmulticastgroup,eliminates 61% of these failures. The highest throughput of 693 Mbps(86.6MB/s)wasreachedwhentransferring4.7GB VM images between Node B and Node D, nearly at the physical layer capacity of the Wi-Fi 6 link. The 1.8% message delivery shortfall can be explained by lack of WebSocket auto-reconnection logic, identified as a toppriorityfixforthenextrelease.

Fig. 4. Transfer throughput (MB/s) by file size across all four testbed node pairs on a Wi-Fi 6 LAN.

TABLE III. System Performance, Reliability, and Recovery Metrics

Metric Value

Device discovery failure rate 2.7%

mDNS recovery of UDP failures 61%

Avg throughput (all file types) > 85 MB/s

Peak throughput (4.7 GB ISO, B->D) 693 Mbps (86.6 MB/s)

A. Architectural Trade-offs

ThequantifiablebenefitsandclearlimitationsofAirShare's serverless, LAN-scoped design are as follows. Regarding data sovereignty, no data leave the subnet, providing structuralprivacyprotectionthatcloud-mediatedsystems would not be able to provide without contractual restrictions. On throughput, Wi-Fi 6 with its theoretical 2402 Mbps bandwidth delivers observed 693 Mbps transferrates-anorderofmagnitudeabove50-1000Mbps typicalresidentialWANuplinks-anddoesnotdependona WAN bottleneck in a cloud relay system. Topological constraintisthemainlimitation:AirSharecannotdiscover devices separated by VPN tunneling, and devices isolated behindaroutermayneedtobeconfigured as LAN members.

NetworkService.addDeviceManually() offers a manual IP fallbackforconstrainedtopologies.UDP-baseddiscoveryis also not very scalable past a few hundred devices, where broadcastingwouldtakeadisproportionateportionoflink bandwidth.

VII. KNOWN LIMITATIONS AND DESIGN DECISIONS

Thereare fourdesigndecisionswhichhave explicittradeoffs. First, SHA-256 checksum computation executes synchronouslyonthemainDartisolate,adding210-318ms of UI-blocking overhead per large file; this will be eliminated by migrating to Isolate.spawn() for concurrent

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

computation. Second, inbound transfers are now automatically accepted on metadata validation, which is suitable for trusted home LANs, but requires an explicit user confirmation dialog before deployment on shared corporateoruniversitynetworks.Third,allTCPtransfers are unprotected; passive packet capture on the LAN can expose file contents; TLS integration via pointycastle (RSA-2048 key exchange and AES-256-GCM session encryption) is staged for the next major release. Fourth, browser-targetedbuildshavenoaccesstorawUDPorTCP sockets due to sandbox restrictions and fall back to manual IP entry, making discovery significantly less usablethanonnativebuilds.

VIII. CONCLUSION

AirShare shows that the entire functional surface of cloud- mediatedfile sharing - including automatic peer discovery, high-throughput binary transfer, live chat, multi-device session management, and cross-device clipboardsynchronization-isachievableinalocalarea network with platform-neutral Dart and Flutter primitives. The hybrid UDP-broadcast and mDNS discovery model supports sub-three-second peer discovery inmostexperimentalnetworkconfigurations, andthecustomlength-prefixedTCPstreamingprotocol sustainsfiletransferratesover85MB/sunderempirical LAN conditions. The system does not rely on the internet, external accounts, or any third-party infrastructure,andprovidesstructuraldatasovereignty notofferedbycloud-relayalternatives.

IX. FUTURE WORK

Five extensions are being given first priority for further development. (A) End-to-End Transport Encryption: RSA- 2048 ephemeral key exchange and AES-256-GCM session encryption of all TCP channels through the pointycastle library, strengthening AirShare to run on sharednetworks.

(B) Isolate-Offloaded Cryptography: SHA-256 offloading to dedicated Dart Isolates via compute() or Isolate.spawn(),enablingparallelchecksumcomputation and eliminating main-isolate blocking. (C) WebRTCBased Cross-Subnet Discovery: integration of flutter_webrtctoallowbrowser-nativeP2Ptransferand discovery across subnet boundaries without requiring manual IP configuration. (D) QR Code Bootstrapping: initiate connection by automatically scanning QRencodeddeviceIPandport,eliminatingmanualentryin broadcast-suppressed networks. (E) Adaptive Chunk Sizing: a feedback-based algorithm that measures perchunk transmission time and adaptively adjusts CHUNK_SIZE to maximize throughput under variable networkconditions.

ACKNOWLEDGMENT

The authors thank their project mentor, Dr. Fatima Inamdar,forherguidancethroughoutthisresearch.They also acknowledge the Department of Computer

Engineering, Vishwakarma Institute of Technology, for providing the testbed infrastructure, and the maintainers of the Dart/Flutter open-source packages (multicast_dns, hive_flutter, websocket_channel, file_picker, crypto, provider,flutter_animate)whosecontributionsformedthe foundationofAirShare.

REFERENCES

[1]I. Stoica, R. Morris, D. Karger, M. F. Kaashoek, and H. Balakrishnan,"Chord:Ascalablepeer-to-peerlookupservicefor internet applications," ACM SIGCOMM Comput. Commun. Rev., vol.31,no.4,pp.149-160,Aug.2001.

[2] C. Kan, "Gnutella: The anatomy of a P2P protocol," IEEE InternetComput.,vol.5,no.4,pp.86-90,Jul./Aug.2001.

[3]M.Ripeanu,I.Foster,andA.Iamnitchi,"MappingtheGnutella network: Properties of large-scale peer-to-peer systems," IEEE InternetComput.,vol.6,no.1,pp.50-57,Jan./Feb.2002.

[4]S.CheshireandM.Krochmal,"MulticastDNS,"IETFRFC6762, Feb.2013.

[5]S.CheshireandM.Krochmal,"DNS-BasedServiceDiscovery," IETFRFC6763,Feb.2013.

[6] M. Allman, V. Paxson, and W. Stevens, "TCP Congestion Control,"IETFRFC2581,Apr.1999.

[7] R. Sherrat, J. Rossiter, and I. Warpefelt, "Protocol encodings usingType-Length-ValuemessagingforembeddedIoTstacks,"in Proc.IEEEIECON,Lisbon,Portugal,2019,pp.4312-4317.

[8]J.Postel,"TransmissionControlProtocol,"IETFRFC793,Sep. 1981.

[9]NationalInstituteofStandardsandTechnology,"SecureHash Standard(SHS),"FIPSPub.180-4,2015.

[10] A. Hagar, S. Tomlin, and R. Pelletier, "Benchmarking embedded key-value stores inFlutter: Hive, SQLite, and Shared Preferences,"J.MobileComput.Appl.,vol.14,no.3,pp.210-228, Sep.2022.

[11] Flutter Engineering Team, "State management with Provider,"GoogleDevelopersBlog,2021.

[12] M. Castro and B. Liskov, "Practical Byzantine fault tolerance," in Proc. 3rd USENIX OSDI, New Orleans, LA, USA, 1999,pp.173-186.

[13] A. Muthitacharoen, B. Chen, and D. Mazieres, "A lowbandwidthnetworkfilesystem,"inProc.18thACMSOSP,Banff, Canada,2001,pp.174-187.

[14] D.E.EastlakeandP.E.Jones,"USSecureHashAlgorithm1 (SHA1),"IETFRFC3174,Sep.2001.

[15] M. Satyanarayanan, "Pervasive computing: Vision and challenges," IEEE Pers. Commun., vol. 8, no. 4, pp. 10-17, Aug. 2001.

[16] I. Fette and A. Melnikov, "The WebSocket Protocol," IETF RFC6455,Dec.2011.

[17] M.FowlerandJ.Lewis,"Microservices,"martinfowler.com, Mar.2014

Turn static files into dynamic content formats.

Create a flipbook