怎样通过socket收取二进制文件
1个回答
展开全部
文件指针问题,
你加收函数中
FILE *fp=fopen("D:\\t2.avi","wb");文件会一直被重新创建
改成
FILE *fp=fopen("D:\\t2.avi","ab");
w Opens an empty file for writing. If the given file exists, its contents are destroyed.
a
Opens for writing at the end of the file (appending) without removing the EOF marker before writing new data to the file; creates the file first if it doesn’t exist.
你加收函数中
FILE *fp=fopen("D:\\t2.avi","wb");文件会一直被重新创建
改成
FILE *fp=fopen("D:\\t2.avi","ab");
w Opens an empty file for writing. If the given file exists, its contents are destroyed.
a
Opens for writing at the end of the file (appending) without removing the EOF marker before writing new data to the file; creates the file first if it doesn’t exist.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询