如何在C中使用socking programmin传输.wav文件 [英] How to tranfer .wav files using socking programmin in C

查看:105
本文介绍了如何在C中使用socking programmin传输.wav文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从服务器端发送的文件应该能够接收文件,应该在客户端播放,文件格式应该是.wav格式



我尝试了什么:



我使用fread命令读取整个wav文件并将其传输到客户端但无法使用检索客户端的整个文件。

The file sent from the server side should be able to recieve the file and should be played on the client side and the file format should be .wav format

What I have tried:

I have used fread command to read the whole wav file and tranfer it to the client side but cannot be able to retrieve the whole file i client side.

推荐答案

当你没有收到客户端上的整个文件时,文件的某些位丢失了。阅读此套接字教程以便学习。



你需要传输整个文件,所有字节都是正确的,而不是播放它。将原始文件和接收文件与文件比较工具进行比较,以找出差异。
When you havent received the whole file on the client than some bits of the files are missing. Read this Socket tutorial for learning.

You need to transfer the whole file with all bytes correct and than play it. Compare the original and the received file with a file comparison tool for finding the differences.


这篇关于如何在C中使用socking programmin传输.wav文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆