开发者

How to speedup UDP communications in Windows XP applications

开发者 https://www.devze.com 2022-12-12 16:53 出处:网络
I am doing some maintenance on software and have a problem that I do not understand. Application was developed using Microsoft Visual C++开发者_运维知识库 6 and runs on Windows XP. It consists of 21

I am doing some maintenance on software and have a problem that I do not understand.

Application was developed using Microsoft Visual C++开发者_运维知识库 6 and runs on Windows XP. It consists of 21 applications that communicate to each other via UDP sockets. It is a simulation of an embedded avionics system used to debug the system in a PC environment. Each of the applications simulates a node in the embedded system and the embedded networked is simulated over UDP. The system originally ran on multiple PCs but can now runs on a single Quad core machine.

The system is working but the communication is annoyingly slow. However opening up Internet Explorer and visiting a web site or two set something that would cause my applications to suddenly communicate very fast to each other.

So my question is what did Internet Explorer set when visiting a web site so that my application can also set it? None of the original authors of the system is still around and I have very little windows programming experience.


it might not be a windows problem after all

  1. check your API, check your buffer and check for errormessages 'getlasterror()' that doesn't cause INVALID (-1) and stops the program try to use it even if your program runs perfectit might have useful warnings

  2. check ACK or attack speed it's a common issue at transfer large amounts of data over network connections ( <-- 90% it's your problem ), here is a useful topic on that subject ( support.microsoft.com/kb/823764 )

  3. if neither of those solutions work, try checking your driver version against the manfucturer website.

  4. last resort is those useful ideas: . use this program www.lvllord.de to increase max half/open connections from 8 to 50 . using a server edition windows can boost some internet based programs . using multi-threading with sockets API can cause some confusing to the API if you're using more than 2 sockets at different threads in multithreaded application, try optimize performance by using async sockets or something like that ( msdn.microsoft.com/en-us/library/ms738551(VS.85).aspx )

So my question is what did Internet Explorer set when visiting a web site so that my application can also set it? None of the original authors of the system is still around and I have very little windows programming experience.

may be ACK check it on wiki .. it means in other ways the attack speed .. if not then it will be the receive window size
both settings are invisible to users .. but can be set via programs such as tuneup utilities or any general network hidden setting adjustors
it might just do the trick ..


If the protocol above UDP implements reliability the speed loss will be due to massive UDP packet loss on localhost. UDP performance on localhost is terrible, your best bet is to wrap the socket API inside a TCP layer.

If it's UDP broadcast or multicast you will have to look at implementing a broker process to multiplex the messages over TCP.

Might be easier to look at existing messaging APIs that work well at the interprocess level such as ZeroMQ.


Try using Wireshark to see what Internet Explorer is doing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号