简体   繁体   English

C中的Winsock文件传输

[英]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? 有谁知道在哪里可以找到一个网站,其中包含如何使用C中的套接字(Winsock)编写文件传输程序的整个布局? Strictly C, so no C++ nor C#. 严格C,所以没有C ++也没有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 . 您应该查看Beej的网络编程指南 ,这是我学习如何在C中使用socketing的地方。它主要是基于Linux的,但它确实包含有关如何在Windows中使用它的信息 You simply have to #include <winsock.h> and call WSAStartup . 您只需要#include <winsock.h>并调用WSAStartup

There are also a lot of comprehensive guides on the internet, along with simple client-server examples you can implement. 互联网上还有很多综合指南,以及您可以实施的简单客户端 - 服务器示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM