This requires discussion for best practices related to server development using C++ on Windows 7 32-bit
The typical requirements:
- A program that acts like a "server", running in Windows in the background. It should run for days, should run automatically at each start.
- Server Handles incoming client connections via TCP socket protocol from other devices (PC,Smartphone,tablets)
- Server in-turn communicating with large number of embedded devices connected in same network via TCP and serial communications
- Server acting as bridge b/w clients (PC, smartphone, tablets) and embedded devices
The server admin can configure server through the configuration .ini file and then can start server.
The interface to the client end is TCP socket interface, client will send command and server inturn will reply with buffer (xml) My questions:
Should I write the program as a "service", like http://code.msdn.microsoft.com/windowsdesktop/CppWindowsService-cacf4948
Or should i write a console application and control this executable from XYNTService http://mysite.verizon.net/XiangYangL/XYNTService.htm so that it acts like a service
Or a console application , with it's entry in registry for starting at login, restart
Does this actually matter, which option to choose from above ?
Many Thanks in advance.