How to clone or save an image file over a TCP/IP peer to peer connection