套接字字节数据包 [英] socket byte packet

查看:78
本文介绍了套接字字节数据包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人

我使用TCP套接字创建了一个应用程序,该应用程序通过网络传输文件.

通过互联网传输文件需要花费大量时间.
是否可以减少文件传输时间?

如何增加每秒的传输字节数?

问候
ak.naser

Dear All

I created one application using TCP Socket which transfers file over the network.

It takes a lot of time to transfer the files over the internet.
Is it possible to reduce file transfer time?

How to increase the transfer byte per second?

Regards
ak.naser

推荐答案

如果一次发送一个字节,它的运行速度可能会非常慢.看看下面的链接,上面有一些很好的示例代码:
http://www.csharp-examples.net/socket-send-receive/ [ ^ ]

另外,如果文件很大,那么它的速度就和您的连接速度一样快.而且,您需要记住,文件大小以字节为单位,连接速度以位/秒为单位.

祝你好运!
If you are sending it one byte at a time it can go really slow. Have a look at the following link with some good example code:
http://www.csharp-examples.net/socket-send-receive/[^]

Also, if the file is large then it''s just going as fast as your connectioon speed is. And with that you need to remember that your file size is measured in bytes and the connection speed is given in bits per second.

Good luck!


这篇关于套接字字节数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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