1 Reply Latest reply on Nov 10, 2012 10:05 AM by Michael Thornburgh

    Send images by local p2p




      i'm trying to send an image though my p2p local connection but so far it doesnt work, as far as i know the send to all neighboors method will let me send objects but this objects can only have string data. any ideas? Im thinking in converting my bytearray to base64 string send it and then decode it and use it in my destination application, does anyone know a better way as base 64 takes its time and depending on the file size it can get really slow.



        • 1. Re: Send images by local p2p
          Michael Thornburgh Adobe Employee

          sendToAllNeighbors can send any AMF serializable object, including ByteArray (or Object, with ByteArray properties, if you want).


          so can (NetGroup.) sendToNearest, sendToNeighbor, post, writeRequestedObject, and NetStream.send.


          you might need to set the NetConnection's defaultObjectEncoding to AMF3 (flash.net.ObjectEncoding.AMF3) to be able to use ByteArray (since that doesn't exist in AMF0).