![](/img/trans.png)
[英]What is the file transfer error in this program while doing a file transfer via Socket in the network?
[英]Network file transfer in Windows
我想使用C或C ++在網絡上傳輸文件。 我應該查找哪些主題? 我怎樣才能做到這一點?
我建議您仔細閱讀 Windows Sockets和boost asio的文檔。
盡管可以使用ReadFile
讀取文件的內容然后通過套接字發送,但Windows還提供了TransmitFile
API,使您可以讀取文件的數據並通過一個系統調用通過套接字發送。
C中有sendfile函數。只需將其簽出即可。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.