wwhhoo never seen something like that...
what you can do is this, read from the socket whatever the server sent you and if is starts by ‰PNG you know it is a pic and put all that source in a file.png

you can see the complete source with mozilla
tontito