i was working on a project in linux where tcp/ip communication is needed(i am using BSD sockets,calls like connect,send etc., ).
i send the data in the structure format. now i need to send an image, there comes the problem. i was new to this so can any one throw some light on how to send the image?
my guess were :
should i convert that Image into some binary data?? if so how can i do that?
or is there any way to send the image itself without any conversion?
The image is already binary data
How to send ?? i mean Can any one give me the BSD socket system call with parameters to send the image .
for example to send message we use send(ssize_t send(int s, const void *buf, size_t len, int flags);) system call ..
In the same manner so that i can send the image directly.