I''ve been experimenting with a new network engine using UDP.
I first started writing the server as a MFC SDI program and, using WSAAsyncSelect() and registering my own Windows User message.
Next, I decided to create a console based app using WSACreateEvent() and WSAEventSelect() in tandem. The reason for this is because the server will eventually be a Windows NT Service.I have the code working and have a somewhat reliable UDP
socket class running, in both Console and Window.
I was astonished to see the difference in speed between the two executables! The Windowed version of the server (getting fed messages from my user message) was about 50 percent faster than the Console application that is in a "busy" loop checking for network events (WSAEnumNetworkEvents()).
Anyone have any ideals about this?
If the window is faster, I suppose I will create it in a window and "lock that window down."
David "Dak Lozar" Loeser
Wow, that''s pretty interesting. I''ve never even tried to write a socket app as a console app, although I''ve integrated my programs to work with such apps. I would assume that they would run at least on a simlar pace. Damn, if the windowed version is faster, make it run in an invisible window.