Hello....i am trying to send a file from server to the client using socket programming in C, how do i do this?? basically the client is trying to download a file from the server....
There are several online networking tutorials online (Beej is a good google term) - I'll assume that you have read these and will ask direct questions on points you do not understand.
The answer to your question, then, is that you
i understood the procedure to do it, but i am new to socket programming so i am looking for some code that helps me in transferring files....
The examples on that site direct you how to send information over a network connection. To send a file, just open your file, read from it and write what was read to the network socket.
Specifically, look at this part and instead of the
char * used in that code substitute the data from your file.