Best way to send images through sockets?

Hi guys I'm just wondering what the best way would be to send an image through sockets?

My server is in Node.JS and my client is in C.

Thanks for letting me know :X

Usually these things are done by sending the length of the content followed by the binary content of the image. Given that you're working with JS, you might have to BASE64 encode the string before sending and decode after receiving.