Windows -vs- Console

Started by
0 comments, last by Dak Lozar 23 years, 10 months ago
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
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
Advertisement
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.

-BacksideSnap-

This topic is closed to new replies.

Advertisement