Nice. I did not understand the server side issue. IMO, the case for .Net on the server side is even better.
1) Locks are faster as they are user mode w/ no kernel mode switch like you would have with a native mutex.
2) Sockets are the same. Small pinvoke overhead with buffer copy on reads/writes, but that is probably not major.
3) DB query and update is same as you need sql client in both.
4) Listen loop is the ~same.
5) Threads work great in .Net. No faster, AFAICT, in native code.
6) Things like System.Threading.Timer are just thin wrappers.
7) It is tons easier to write and debug.
You would need to write it and test for actual perf, but a .Net server exe should not be a general perf issue. BizTalk uses .Net on server side. Did you find a specific issue that was too slow or something you could point to? Did you try the /clr switch and try the server?
Second, could you post a snippet of general idea on how you are doing exceptions to capture the idea you where talking about (i.e. compare/contrast the first way -vs- the way you now use with anonymous delegates). That would be helpful as I did not fully understand from the description. Thanks guys!
TIA
--wjs