twgray wrote:
I am attempting to send a jpeg image file created on an embedded
device over a wifi socket to a Python client running on a Linux pc
(Ubuntu).  All works well, except I don't know, on the pc client side,
what the file size is?

You don't. Sockets are just endless streams of bytes. You will have to design some form of 'wire protocol' that includes the length of the message that is to be read.
For instance a minimalistic protocol could be the following:
Send 4 bytes that contain the length (an int) then the data itself. The client reads 4 bytes, decodes it into the integer that tells it the length, and then reads the correct amount of bytes from the socket.


--irmen
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to