colinramsay.co.uk

Services

03 Apr 2005

I wrote a chatroom using C# sockets and Flash, with XML messages being used to transport data. Now it had one main issue - each XML message was about 1.5k. With one of these being sent every second from every connected client, my home broadband connection (upload speed of 15k/s) was quickly saturated.

Ok, fine. I will put it on one of the Internetware servers - they have compression on IIS and a ton of bandwidth. But the problem is that this chatroom was a console app, and therefore would only run when someone was logged onto the server.

What I needed was to turn it into a Windows Service, like IIS or the Background Transfer service used in Windows Update. Services can run in the background under a certain user, but that user doesn't necessarily have to be logged in...

I didn't do it, because I didn't know how at the time. But now David Cumps has shown me the way. Maybe I'll give it another bash...