我设计了一个应用程序,它允许我在无线 LAN 上发送和接收大文件。我很想知道 WLAN 允许我传输的最大速度。目前我正在使用 100MegaBytes 的缓冲区大小来读取和写入 .networkStream我应该使用什么优化大小来允许我快速复制而不会出现缓冲区溢出?
我目前使用的是 IEEE 802.11n 标准……其他标准会受到影响吗?
PS。我是新来的。如果我的问题在这里看起来不合适/不合适,请引导我到正确的论坛而不是投票。我已经用谷歌搜索过,但对我没有优势。
我设计了一个应用程序,它允许我在无线 LAN 上发送和接收大文件。我很想知道 WLAN 允许我传输的最大速度。目前我正在使用 100MegaBytes 的缓冲区大小来读取和写入 .networkStream我应该使用什么优化大小来允许我快速复制而不会出现缓冲区溢出?
我目前使用的是 IEEE 802.11n 标准……其他标准会受到影响吗?
PS。我是新来的。如果我的问题在这里看起来不合适/不合适,请引导我到正确的论坛而不是投票。我已经用谷歌搜索过,但对我没有优势。
恐怕从网络的角度来看,这是一个有点不可能的问题。
在有线以太网中,如果您有一个千兆交换机和 2 个带有 GB NIC 的客户端,您可以获得稳定的 ~1GB/s 吞吐率。在无线世界中,宣传的最大吞吐率只能在严格控制的实验室环境中实现,在任何真实的现场环境中,许多因素都会影响您的吞吐量:
- Wireless is a half duplex medium
- Wireless is a shared medium. The more clients you have on the same radio, the less bandwidth is available for each client.
- The point above is theoretical, distance affects. If your clients are both 2m from the AP, you get throughput n. When one of the clients moves to 4m away from the AP, your throughput drops.
- There's background noise, and there's interference from both WiFi and non-WiFi devices. This means that if you get average throughput of n Mb/s, I won't get the same throughput even using exactly same equipment and drivers you use due to only different noise floors. Even you may see different throughput in the afternoon compared to the morning. If you use a wired mouse and mine is btooth, we're likely to get different results. Lighting fixtures can interfere wireless throughput. And so on.
- You're using n, where "max throughput" becomes a complicated matter. It depends on what modulation scheme is used, how many spatial streams you have, guard interval etc., answer being somewhere between 6.5 Mb/s and 600Mb/s... same applies to ac-networks.
- If you have legacy clients on your wireless network, the average throughput will drop
我建议你把这个问题提交给 Stack Overflow。编码人员可能会给你一个更有意义的答案,因为过去可能有人处理过类似的情况。
当然,您可以从http://www.speedguide.net/faq/what-is-the-actual-real-life-speed-of-wireless-374获取预期的平均吞吐率,但这些往往取决于你问谁。以下是 Superuser 关于 802.11n 上 wless 平均吞吐量的讨论:https ://superuser.com/questions/187485/average-transit-speed-for-802-11n-wireless-ap 。您仍然应该询问有关在 Stack Overflow 中计算适当缓冲区大小的问题。