TCP Client/Server code for requesting files from Raspberry Pi

Hi guys,
Now that I finally got part of my project working, I thought I could share it for anyone else who might be interested. It consists of code for a Raspberry Pi server and Spark Core client.

The main feature right now is that the Core can send a request like “GET file” and the Raspberry Pi will open the file and sent it back to the Spark Core. It is in its infancy so there still might be some small bugs. The integration between the R. Pi and Spark Core are a major part of my project, so this is going to continue to develop into something more.

If you have any questions, problems, or suggestions, please let me know! I tried to heavily comment the code to make understand what is going on easier. I tried to compile on OSX Mavericks, but there are issues with the linker that I don’t feel like solving at the moment.

Here is the link:

4 Likes

Remember if you are transferring files that aren’t text to use memcpy instead of strcpy or anything string related