Cocoon P2PÂ is a peer-to-peer library for Flex/AIR and mobile devices that makes peer discovery, messaging and object replication via the RTMFP protocol easy and straightforward. It was created with simplicity in mind and does most of the work (connection and group creation, message handling etc.) automatically for you.
By default, it uses LAN only RTMFP connections (no server involved) which allows to easily connect multiple devices on your LAN/WLAN but it can also be used with Adobe’s Cirrus service.
channel = new LocalNetworkDiscovery(); channel.clientName = "MyName"; channel.addEventListener(ClientEvent.CLIENT_ADDED, onClientAdded); channel.addEventListener(ClientEvent.CLIENT_UPDATE, onClientUpdate); channel.addEventListener(ClientEvent.CLIENT_REMOVED, onClientRemoved); channel.addEventListener(MessageEvent.DATA_RECEIVED, onDataReceived); channel.connect();