C#使用UDP和TCP协议发送数据会导致硬件故障吗? [英] C# Sending data using UDP and TCP protocols can cause malfunction of hardware?

查看:92
本文介绍了C#使用UDP和TCP协议发送数据会导致硬件故障吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个专门用于控制策略游戏Age of Empires 3的PC的远程控制应用程序(所以我可以使用一台PC控制两个文明)。应用程序使用UDP协议发送捕获的图像(我将一个dll注入age3.exe进程并挂钩DirectX EndScene函数,以便每次游戏渲染时应用程序捕获图像并发送它)。对于声音,应用程序使用环回录制并使用UDP协议发送它。对于每个映像,应用程序每次发送大约80000个字节,声音为7000字节。当我使用键盘或鼠标时,应用程序使用TCP协议进行通信。每次我移动鼠标或按一个键,应用程序发送12个字节的信息。该应用程序显然工作正常(我测试它运行应用程序的时间很短,当我认为应用程序几乎准备就绪时,我测试它玩2个游戏2对2个计算机玩家)。但最近我遇到了互联网问题(下载非常慢,导航速度很慢......)。我重新启动了电脑和调制解调器,但同样的问题。我尝试使用具有相同结果的笔记本。我改变了调制解调器。我与我的ISP进行了沟通,但他们还没有解决问题。所以我的问题是:我的应用程序可能导致我的所有问题吗?

I made an application for remote control a pc specifically for control the strategy game Age of Empires 3 (so I can control two civs using one pc). The application uses UDP protocol to send the captured image (I inject a dll to the age3.exe proccess and I hook the DirectX EndScene function so every time the game render the application captures the image and sends it). For sound the application uses loopback recording and send it using UDP protocol too. For each image the application sends approximately 80000 bytes each time and for sound 7000 bytes. The application uses TCP protocol for communicating when I use keyboard or mouse. Every time I move the mouse or press a key the application sends 12 bytes with information. The application apparently works ok (I test it running the application for short time and when I considered that the application was almost ready I test it playing two games 2 vs 2 computer players). But recently I am experiencing Internet problems (very slow downloads, very slow navigation, ...). I restarted the pcs and the modem but the same problem. I tried using a notebook with same results. I changed the modem. I communicated with my ISP but they could not solve the problem yet. So my question is: Could my application cause all my problems?

推荐答案

它会导致您的硬件失败吗?不。



这听起来像是一个ISP问题,或者说是最糟糕的硬件,而且你的应用程序正好在运行中,这只是巧合。
Can it cause your hardware to fail? Nope.

This sounds like an ISP problem or at most bad hardware and it's just a coincidence that your app happens to be running.


这篇关于C#使用UDP和TCP协议发送数据会导致硬件故障吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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