Peter N Peter N - 3 months ago 28
C Question

Winsock File Transfer in C

Does anyone know where I can find a website with a whole layout on how to program a file transfer program using sockets (Winsock) in C? Strictly C, so no C++ nor C#. I want to test out transferring files over from my desktop to my laptop.


You should check out Beej's Guide to Network Programming, that's where I learned how to use socketing in C. It's mainly Linux-based but it does include information on how to use it with Windows. You simply have to #include <winsock.h> and call WSAStartup.

There are also a lot of comprehensive guides on the internet, along with simple client-server examples you can implement.